From 48c57142261289472b6da8a838108609b8eb405e Mon Sep 17 00:00:00 2001 From: Matti Eiden Date: Tue, 8 Aug 2023 10:13:23 +0300 Subject: [PATCH] Address PR comments, remove duplicate query --- events/api.py | 1 - 1 file changed, 1 deletion(-) diff --git a/events/api.py b/events/api.py index 8664176d4..a1e6483f3 100644 --- a/events/api.py +++ b/events/api.py @@ -3157,7 +3157,6 @@ def _filter_event_queryset(queryset, params, srs=None): # noqa: C901 queryset = queryset.filter( Exists(Offer.objects.filter(event=OuterRef("pk"), is_free=True)) ) - queryset = queryset.exclude(~Q(offers__is_free=True)) # Include events that have no free offers elif val.lower() == "false": queryset = queryset.exclude(offers__is_free=True)