fix: Allow allow_certificate field to be null in preparation for removing it (#27432)

DEPR-140 MICROBA-985
This commit is contained in:
Christie Rice
2021-04-28 08:50:18 -04:00
committed by GitHub
parent af59696087
commit 44ed703d41
2 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
# Generated by Django 2.2.20 on 2021-04-27 15:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('student', '0041_registration_activation_timestamp'),
]
operations = [
migrations.AlterField(
model_name='userprofile',
name='allow_certificate',
field=models.BooleanField(default=1, null=True),
),
]

View File

@@ -614,7 +614,7 @@ class UserProfile(models.Model):
)
state = models.CharField(blank=True, null=True, max_length=2, choices=STATE_CHOICES)
goals = models.TextField(blank=True, null=True)
allow_certificate = models.BooleanField(default=1)
allow_certificate = models.BooleanField(default=1, null=True)
bio = models.CharField(blank=True, null=True, max_length=3000, db_index=False)
profile_image_uploaded_at = models.DateTimeField(null=True, blank=True)
phone_regex = RegexValidator(regex=r'^\+?1?\d*$', message="Phone number can only contain numbers.")