Skip to content
Snippets Groups Projects
Commit f3428963 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch 'primary-group-optional' into 'master'

Make primary group optional

See merge request AlekSIS/AlekSIS!152
parents 5402481b 025f0b89
No related branches found
No related tags found
1 merge request!152Make primary group optional
Pipeline #832 failed
# Generated by Django 3.0.2 on 2020-02-03 22:41
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0010_create_validation_service'),
]
operations = [
migrations.AlterField(
model_name='person',
name='primary_group',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.Group'),
),
]
......@@ -123,7 +123,7 @@ class Person(ExtensibleModel):
"self", verbose_name=_("Guardians / Parents"), symmetrical=False, related_name="children", blank=True
)
primary_group = models.ForeignKey("Group", models.SET_NULL, null=True)
primary_group = models.ForeignKey("Group", models.SET_NULL, null=True, blank=True)
@property
def primary_group_short_name(self) -> Optional[str]:
......
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