forked from CGM_Public/pretix_original
Fix TypeError in Order.ticket_download_available on "empty" orders (#2176)
Co-authored-by: alice <tickets-dev@kulturkosmos.de> Co-authored-by: nd <git@notandy.de> Co-authored-by: alice <tickets-dev@kulturkosmos.de>
This commit is contained in:
@@ -783,6 +783,7 @@ class Order(LockModel, LoggedModel):
|
|||||||
def ticket_download_available(self):
|
def ticket_download_available(self):
|
||||||
return self.event.settings.ticket_download and (
|
return self.event.settings.ticket_download and (
|
||||||
self.event.settings.ticket_download_date is None
|
self.event.settings.ticket_download_date is None
|
||||||
|
or self.ticket_download_date is None
|
||||||
or now() > self.ticket_download_date
|
or now() > self.ticket_download_date
|
||||||
) and (
|
) and (
|
||||||
self.status == Order.STATUS_PAID
|
self.status == Order.STATUS_PAID
|
||||||
|
|||||||
Reference in New Issue
Block a user