Skip to content
Snippets Groups Projects
Verified Commit fd1bb8fb authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Remove null=True from not unique CharFields

parent 72fd701c
No related branches found
No related tags found
1 merge request!823Resolve "Place of birth is None if unset"
# Generated by Django 3.2.10 on 2021-12-15 21:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0027_person_place_of_birth'),
]
operations = [
migrations.AlterField(
model_name='oauthapplication',
name='authorization_grant_type',
field=models.CharField(blank=True, choices=[('authorization-code', 'Authorization code'), ('implicit', 'Implicit'), ('password', 'Resource owner password-based'), ('client-credentials', 'Client credentials'), ('openid-hybrid', 'OpenID connect hybrid')], default='', max_length=32),
preserve_default=False,
),
migrations.AlterField(
model_name='person',
name='place_of_birth',
field=models.CharField(blank=True, default='', max_length=255, verbose_name='Place of birth'),
preserve_default=False,
),
]
......@@ -194,9 +194,7 @@ class Person(ExtensibleModel):
email = models.EmailField(verbose_name=_("E-mail address"), blank=True)
date_of_birth = models.DateField(verbose_name=_("Date of birth"), blank=True, null=True)
place_of_birth = models.CharField(
verbose_name=_("Place of birth"), max_length=255, blank=True, null=True
)
place_of_birth = models.CharField(verbose_name=_("Place of birth"), max_length=255, blank=True)
sex = models.CharField(verbose_name=_("Sex"), max_length=1, choices=SEX_CHOICES, blank=True)
photo = models.ImageField(verbose_name=_("Photo"), blank=True, null=True)
......@@ -1118,7 +1116,7 @@ class OAuthApplication(AbstractApplication):
# Override grant types to make field optional
authorization_grant_type = models.CharField(
max_length=32, choices=AbstractApplication.GRANT_TYPES, blank=True, null=True
max_length=32, choices=AbstractApplication.GRANT_TYPES, blank=True
)
# Optional list of alloewd scopes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment