From 242de5f749285fdcc6d968c816181b95d5cabfe7 Mon Sep 17 00:00:00 2001 From: moanos Date: Sun, 31 Aug 2025 18:05:02 +0200 Subject: [PATCH] fix: filter for active adoption notices --- src/fellchensammlung/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fellchensammlung/models.py b/src/fellchensammlung/models.py index 6e82233..51d79f1 100644 --- a/src/fellchensammlung/models.py +++ b/src/fellchensammlung/models.py @@ -1029,7 +1029,7 @@ class SocialMediaPost(models.Model): @staticmethod def get_an_to_post(): adoption_notices_without_post = AdoptionNotice.objects.filter(socialmediapost__isnull=True, - adoptionnoticestatus__major_status=AdoptionNoticeStatus.ACTIVE) + adoption_notice_status__in=AdoptionNoticeStatusChoices.Active.values) return adoption_notices_without_post.first() def __str__(self):