request.event.tickets.filter(status='on-sale')
returns all objects with status='on-sale'
, and you are looking for objects with status='paused'
in that list, which is why you are getting an empty queryset.
Chaining 2 filters is fine if it is a ManyToManyField
where you can have multiple objects for the same field OR if you are chaining for 2 separate fields eg. request.event.tickets.filter(status='on-sale').filter(is_available=True)
, which returns all tickets that are on sale and are available.
The simplest approach for this problem would be to use __in
in the filter like this: ticket_query = request.event.tickets.filter(status__in=['on-sale', 'paused']).prefetch_related('ticket_tax')
.
Hope this helps. :)