diff --git a/members/admin/union_admin.py b/members/admin/union_admin.py index 0e7a9fee..186d8fc9 100644 --- a/members/admin/union_admin.py +++ b/members/admin/union_admin.py @@ -83,7 +83,7 @@ class UnionAdmin(admin.ModelAdmin): list_display = ( "union_link", "address", - "union_email", + "email", "founded_at", "closed_at", "waitinglist_count_link", @@ -124,7 +124,7 @@ def get_queryset(self, request): ( "Navn og Adresse", { - "fields": ("name", "union_email", "address"), + "fields": ("name", "email", "address"), "description": "
Udfyld navnet på foreningen (f.eks København, \ vestjylland) og adressen
", }, diff --git a/members/migrations/0055_rename_union_email_union_email.py b/members/migrations/0055_rename_union_email_union_email.py new file mode 100644 index 00000000..1d2b70b3 --- /dev/null +++ b/members/migrations/0055_rename_union_email_union_email.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.11 on 2024-08-31 11:39 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("members", "0054_merge_20240617_2150"), + ] + + operations = [ + migrations.RenameField( + model_name="union", + old_name="union_email", + new_name="email", + ), + ] diff --git a/members/models/union.py b/members/models/union.py index f7c8eefa..76c76568 100644 --- a/members/models/union.py +++ b/members/models/union.py @@ -55,7 +55,7 @@ class Meta: ) secretary_old = models.CharField("Sekretær", max_length=200, blank=True) secretary_email_old = models.EmailField("Sekretærens email", blank=True) - union_email = models.EmailField("Foreningens email", blank=True) + email = models.EmailField("Foreningens email", blank=True) statues = models.URLField("Link til gældende vedtægter", blank=True) founded_at = models.DateField("Stiftet", blank=True, null=True) closed_at = models.DateField( diff --git a/members/tests/factories/union_factory.py b/members/tests/factories/union_factory.py index fd84104e..372dbfe3 100644 --- a/members/tests/factories/union_factory.py +++ b/members/tests/factories/union_factory.py @@ -19,7 +19,7 @@ class Meta: cashier_email_old = Faker("email") secretary_old = Faker("name") secretary_email_old = Faker("email") - union_email = Faker("email") + email = Faker("email") statues = Faker("url") founded_at = Faker("date_time", tzinfo=TIMEZONE) closed_at = Faker("date_time", tzinfo=TIMEZONE)