diff --git a/members/migrations/0052_alter_activity_address.py b/members/migrations/0052_alter_activity_address.py new file mode 100644 index 00000000..99f71e3f --- /dev/null +++ b/members/migrations/0052_alter_activity_address.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.11 on 2024-05-26 16:15 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ("members", "0051_alter_address_region"), + ] + + operations = [ + migrations.AlterField( + model_name="activity", + name="address", + field=models.ForeignKey( + on_delete=django.db.models.deletion.PROTECT, + to="members.address", + verbose_name="Adresse", + ), + ), + ] diff --git a/members/models/activity.py b/members/models/activity.py index ee77d066..56ebd14e 100644 --- a/members/models/activity.py +++ b/members/models/activity.py @@ -72,7 +72,7 @@ class Meta: "Aktiviteten gør personen til medlem", default=True, help_text=help_temp ) address = models.ForeignKey( - "Address", on_delete=models.PROTECT, verbose_name="Adresse", default=1 + "Address", on_delete=models.PROTECT, verbose_name="Adresse", null=False ) def is_historic(self):