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:
nd
2021-08-17 23:42:36 +02:00
committed by GitHub
parent 3f7664f743
commit c513868afa

View File

@@ -783,6 +783,7 @@ class Order(LockModel, LoggedModel):
def ticket_download_available(self):
return self.event.settings.ticket_download and (
self.event.settings.ticket_download_date is None
or self.ticket_download_date is None
or now() > self.ticket_download_date
) and (
self.status == Order.STATUS_PAID