From 3261f5a90acd8a8027ed3f9953d18d9b5223e55b Mon Sep 17 00:00:00 2001 From: moanos Date: Wed, 3 Sep 2025 06:43:12 +0200 Subject: [PATCH] fix: Allow to actually close AN --- .../templates/fellchensammlung/misc/deactivate-an.html | 10 +++++----- src/fellchensammlung/views.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/fellchensammlung/templates/fellchensammlung/misc/deactivate-an.html b/src/fellchensammlung/templates/fellchensammlung/misc/deactivate-an.html index c65d116..feeb03a 100644 --- a/src/fellchensammlung/templates/fellchensammlung/misc/deactivate-an.html +++ b/src/fellchensammlung/templates/fellchensammlung/misc/deactivate-an.html @@ -11,12 +11,12 @@
diff --git a/src/fellchensammlung/views.py b/src/fellchensammlung/views.py index 6fb8b2e..7fa068a 100644 --- a/src/fellchensammlung/views.py +++ b/src/fellchensammlung/views.py @@ -929,7 +929,7 @@ def deactivate_an(request, adoption_notice_id): adoption_notice = get_object_or_404(AdoptionNotice, pk=adoption_notice_id) if request.method == "POST": reason_for_closing = request.POST.get("reason_for_closing") - if reason_for_closing not in AdoptionNoticeStatusChoices.Closed.choices: + if reason_for_closing not in AdoptionNoticeStatusChoices.Closed.values: return render(request, "fellchensammlung/errors/403.html", status=403) adoption_notice.adoption_notice_status = reason_for_closing adoption_notice.save()