Skip to content
Snippets Groups Projects
Verified Commit 025f0b89 authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Make primary group optional

parent 5402481b
No related branches found
No related tags found
1 merge request!152Make primary group optional
Pipeline #831 passed with warnings
# 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.
Please register or to comment