1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2024-12-05 01:26:54 +00:00

A user can have no team

This commit is contained in:
Yohann D'ANELLO 2020-12-28 11:52:34 +01:00
parent eec941c816
commit 95a69f35d2
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
2 changed files with 4 additions and 2 deletions

View File

@ -50,7 +50,7 @@ class Migration(migrations.Migration):
('student_class', models.IntegerField(choices=[(12, '12th grade'), (11, '11th grade'), (10, '10th grade or lower')], verbose_name='student class')),
('school', models.CharField(max_length=255, verbose_name='school')),
('photo_authorization', models.FileField(blank=True, default='', upload_to=registration.models.get_random_filename, verbose_name='photo authorization')),
('team', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='students', to='participation.team', verbose_name='team')),
('team', models.ForeignKey(default=None, blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='students', to='participation.team', verbose_name='team')),
],
options={
'verbose_name': 'student registration',
@ -63,7 +63,7 @@ class Migration(migrations.Migration):
fields=[
('registration_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='registration.registration')),
('professional_activity', models.TextField(verbose_name='professional activity')),
('team', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='coachs', to='participation.team', verbose_name='team')),
('team', models.ForeignKey(default=None, blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='coachs', to='participation.team', verbose_name='team')),
],
options={
'verbose_name': 'coach registration',

View File

@ -105,6 +105,7 @@ class StudentRegistration(Registration):
related_name="students",
on_delete=models.PROTECT,
null=True,
blank=True,
default=None,
verbose_name=_("team"),
)
@ -154,6 +155,7 @@ class CoachRegistration(Registration):
related_name="coachs",
on_delete=models.PROTECT,
null=True,
blank=True,
default=None,
verbose_name=_("team"),
)