SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 8c5728dc authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Force non-null title in Profile

parent 3ea0f6c3
No related branches found
No related tags found
No related merge requests found
# Generated by Django 3.2.5 on 2021-10-06 10:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('profiles', '0034_auto_20210310_2026'),
]
operations = [
migrations.AlterField(
model_name='profile',
name='title',
field=models.CharField(choices=[('PR', 'Prof.'), ('DR', 'Dr'), ('MR', 'Mr'), ('MRS', 'Mrs'), ('MS', 'Ms'), ('MX', 'Mx')], default='DR', max_length=4),
),
]
...@@ -8,7 +8,7 @@ from django.db.models.functions import Concat ...@@ -8,7 +8,7 @@ from django.db.models.functions import Concat
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
from scipost.behaviors import orcid_validator from scipost.behaviors import orcid_validator
from scipost.constants import TITLE_CHOICES from scipost.constants import TITLE_CHOICES, TITLE_DR
from scipost.fields import ChoiceArrayField from scipost.fields import ChoiceArrayField
from scipost.models import Contributor from scipost.models import Contributor
...@@ -47,7 +47,11 @@ class Profile(models.Model): ...@@ -47,7 +47,11 @@ class Profile(models.Model):
* mark somebody as a non-referee (if that person does not want to referee for SciPost) * mark somebody as a non-referee (if that person does not want to referee for SciPost)
""" """
title = models.CharField(max_length=4, choices=TITLE_CHOICES, blank=True, null=True) title = models.CharField(
max_length=4,
choices=TITLE_CHOICES,
default=TITLE_DR
)
first_name = models.CharField(max_length=64) first_name = models.CharField(max_length=64)
last_name = models.CharField(max_length=64) last_name = models.CharField(max_length=64)
......
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