mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Widget: Fix crash if availability is unknown
This commit is contained in:
@@ -559,7 +559,10 @@ class WidgetAPIProductList(EventListMixin, View):
|
|||||||
if self.request.event.settings.event_list_available_only:
|
if self.request.event.settings.event_list_available_only:
|
||||||
evs = [
|
evs = [
|
||||||
se for se in evs
|
se for se in evs
|
||||||
if not se.presale_has_ended and se.best_availability_state >= Quota.AVAILABILITY_RESERVED
|
if not se.presale_has_ended and (
|
||||||
|
se.best_availability_state is not None and
|
||||||
|
se.best_availability_state >= Quota.AVAILABILITY_RESERVED
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
data['events'] = [
|
data['events'] = [
|
||||||
|
|||||||
Reference in New Issue
Block a user