From 5ac55df1607d75f148b5db081f0ca4c5a5868a1b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Barnab=C3=A1s=20Cz=C3=A9m=C3=A1n?= <trabarni@gmail.com>
Date: Sat, 3 Feb 2018 20:23:12 +0100
Subject: [PATCH] Set nick & motvation to empty string

---
 .../migrations/0016_auto_20180203_2022.py     | 23 +++++++++++++++++++
 src/account/models.py                         |  5 ++--
 2 files changed, 26 insertions(+), 2 deletions(-)
 create mode 100644 src/account/migrations/0016_auto_20180203_2022.py

diff --git a/src/account/migrations/0016_auto_20180203_2022.py b/src/account/migrations/0016_auto_20180203_2022.py
new file mode 100644
index 0000000..86c2ae6
--- /dev/null
+++ b/src/account/migrations/0016_auto_20180203_2022.py
@@ -0,0 +1,23 @@
+# Generated by Django 2.0.1 on 2018-02-03 19:22
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('account', '0015_auto_20180203_2014'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='profile',
+            name='motivation',
+            field=models.TextField(blank=True, default=''),
+        ),
+        migrations.AlterField(
+            model_name='profile',
+            name='nick',
+            field=models.CharField(blank=True, default='', max_length=15),
+        ),
+    ]
diff --git a/src/account/models.py b/src/account/models.py
index 8e86ff9..da900ea 100644
--- a/src/account/models.py
+++ b/src/account/models.py
@@ -22,8 +22,9 @@ class Profile(models.Model):
     join_date = models.DateTimeField(auto_now_add=True, editable=False)
     updated_at = models.DateTimeField(auto_now=True, editable=False)
     user = models.OneToOneField(User, related_name='profile', on_delete=models.CASCADE)
-    motivation = models.TextField(null=True)
-    nick = models.CharField(max_length=15, blank=True, null=True)
+    # TODO: Change the default to json render side
+    motivation = models.TextField(blank=True, default='')
+    nick = models.CharField(max_length=15, blank=True, default='')
     signed = models.BooleanField(default=False, null=False)
     groups = models.ManyToManyField(GroupChoice, related_name='profiles')
     # Homeworks=models.ForeignKey(Homework)
-- 
GitLab