Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
martcl committed Oct 9, 2023
1 parent c724155 commit acbff99
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/communication/views/banner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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")

0 comments on commit acbff99

Please sign in to comment.