From c1a8206bbbf9cee0f96c64e8cc2993066ee5ec41 Mon Sep 17 00:00:00 2001 From: Ethan Nguyen Date: Thu, 22 Apr 2021 08:32:49 -0400 Subject: [PATCH] fix(authentication): make GPA field optional --- .../migrations/0007_alter_user_gpa.py | 18 ++++++++++++++++++ tjdests/apps/authentication/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tjdests/apps/authentication/migrations/0007_alter_user_gpa.py diff --git a/tjdests/apps/authentication/migrations/0007_alter_user_gpa.py b/tjdests/apps/authentication/migrations/0007_alter_user_gpa.py new file mode 100644 index 0000000..190def6 --- /dev/null +++ b/tjdests/apps/authentication/migrations/0007_alter_user_gpa.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2 on 2021-04-22 12:32 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("authentication", "0006_alter_user_biography"), + ] + + operations = [ + migrations.AlterField( + model_name="user", + name="GPA", + field=models.FloatField(blank=True, help_text="Weighted GPA", null=True), + ), + ] diff --git a/tjdests/apps/authentication/models.py b/tjdests/apps/authentication/models.py index fe93834..c7d3d2f 100644 --- a/tjdests/apps/authentication/models.py +++ b/tjdests/apps/authentication/models.py @@ -8,7 +8,7 @@ class User(AbstractUser): accepted_terms = models.BooleanField(default=False) graduation_year = models.PositiveSmallIntegerField(null=True) - gpa = models.FloatField(null=True, name="GPA", help_text="Weighted GPA") + gpa = models.FloatField(null=True, blank=True, name="GPA", help_text="Weighted GPA") is_senior = models.BooleanField(default=False) is_student = models.BooleanField(default=False)