Commit 333f9055 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Merge branch 'make_snumber_unique' into 'master'

Make student number unique

See merge request thalia/concrexit!977
parents ed75bd2e f09ccba4
......@@ -77,7 +77,7 @@
"fields": {
"user": 1,
"programme": null,
"student_number": "",
"student_number": null,
"address_street": "Heyendaalseweg 135",
"address_street2": "",
"address_postal_code": "1245 TG",
......@@ -103,7 +103,7 @@
"fields": {
"user": 2,
"programme": null,
"student_number": "",
"student_number": null,
"address_street": "testuserv 2",
"address_street2": "",
"address_postal_code": "2545 TG",
......@@ -129,7 +129,7 @@
"fields": {
"user": 3,
"programme": null,
"student_number": "",
"student_number": null,
"address_street": "testuser 2",
"address_street2": "",
"address_postal_code": "6525 TE",
......@@ -155,7 +155,7 @@
"fields": {
"user": 4,
"programme": null,
"student_number": "",
"student_number": null,
"address_street": "testuser 3",
"address_street2": "",
"address_postal_code": "6525 TE",
......
# 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):
message=_('Enter a valid student- or e/z/u-number.'))],
blank=True,
null=True,
unique=True,
)
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