From acbff99570100dc8011d342b407246b623443a1a Mon Sep 17 00:00:00 2001 From: Martin Clementz Date: Mon, 9 Oct 2023 18:35:28 +0200 Subject: [PATCH] chore: formatting --- app/communication/views/banner.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/communication/views/banner.py b/app/communication/views/banner.py index e9234762a..4dd0ddd3c 100644 --- a/app/communication/views/banner.py +++ b/app/communication/views/banner.py @@ -23,7 +23,7 @@ class Meta: def filter_is_visible(self, queryset, name, value): if value: - return queryset.filter(visible_from__lte=now(), visible_until__gte=now()) + return queryset.filter(visible_from__lte=now(), visible_until__gte=now()) return queryset def filter_is_expired(self, queryset, name, value): @@ -52,6 +52,3 @@ def visible(self, request): ) serializer = BannerSerializer(banner, context={"request": request}, many=True) return Response(serializer.data, status=status.HTTP_200_OK) - - def get_queryset(self): - return self.queryset.order_by("-visible_from") \ No newline at end of file