diff --git a/src/fellchensammlung/views.py b/src/fellchensammlung/views.py index 1517312..7820c96 100644 --- a/src/fellchensammlung/views.py +++ b/src/fellchensammlung/views.py @@ -38,7 +38,7 @@ def fail_if_user_not_owner_or_trust_level(user, django_object, trust_level=User. def index(request): """View function for home page of site.""" - latest_adoption_list = AdoptionNotice.objects.order_by("-created_at")[:5] + latest_adoption_list = AdoptionNotice.objects.filter(adoptionnoticestatus__major_status=AdoptionNoticeStatus.ACTIVE).order_by("-created_at")[:5] active_adoptions = [adoption for adoption in latest_adoption_list if adoption.is_active] language_code = translation.get_language() lang = Language.objects.get(languagecode=language_code)