Fix TypeError when accessing a product list without a subevent

This commit is contained in:
Raphael Michel
2017-11-24 09:29:05 +01:00
parent 3eb87a878a
commit 3da11e615f

View File

@@ -195,6 +195,8 @@ class WidgetAPIProductList(View):
self.subevent = request.event.subevents.filter(pk=kwargs['subevent'], active=True).first()
if not self.subevent:
raise Http404()
else:
raise Http404()
else:
if 'subevent' in kwargs:
raise Http404()