Commit f23b986f authored by Thom Wiggers's avatar Thom Wiggers 📐 Committed by Sébastiaan Versteeg
Browse files

Make s-numbers unique

parent ed75bd2e
# Generated by Django 2.0.9 on 2018-10-03 17:06
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('members', '0025_auto_20180928_1409'),
]
operations = [
migrations.AlterField(
model_name='profile',
name='student_number',
field=models.CharField(blank=True, max_length=8, null=True, unique=True, validators=[django.core.validators.RegexValidator(message='Enter a valid student- or e/z/u-number.', regex='(s\\d{7}|[ezu]\\d{6,7})')], verbose_name='Student number'),
),
]
...@@ -222,6 +222,7 @@ class Profile(models.Model): ...@@ -222,6 +222,7 @@ class Profile(models.Model):
message=_('Enter a valid student- or e/z/u-number.'))], message=_('Enter a valid student- or e/z/u-number.'))],
blank=True, blank=True,
null=True, null=True,
unique=True,
) )
starting_year = models.IntegerField( starting_year = models.IntegerField(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment