Fix catalogue behaviour if id=0

This commit is contained in:
Martin Pépin 2017-09-20 18:21:59 +02:00
parent 4091185a68
commit d89ba1efe5

View file

@ -782,9 +782,9 @@ def catalogue(request, request_type):
.select_related('location')
.prefetch_related('quote_set')
)
if categories_id:
if categories_id and 0 not in categories_id:
shows_qs = shows_qs.filter(category__id__in=categories_id)
if locations_id:
if locations_id and 0 not in locations_id:
shows_qs = shows_qs.filter(location__id__in=locations_id)
# On convertit les descriptions à envoyer en une liste facilement