Skip to content

Commit

Permalink
Merge pull request #1049 from CodingPirates/1048-bugen-ny-aktivitet-s…
Browse files Browse the repository at this point in the history
…kal-ikke-have-en-default-adresse

Fjernede default værdi for activity.address, og satte null=False
  • Loading branch information
lakridserne authored May 26, 2024
2 parents 14ddb23 + d838b18 commit f685273
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions members/migrations/0052_alter_activity_address.py
Original file line number Diff line number Diff line change
@@ -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",
),
),
]
2 changes: 1 addition & 1 deletion members/models/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit f685273

Please sign in to comment.