Fix ticket download-date hint when plugins disallow download (#2812)

This commit is contained in:
Richard Schreiber
2022-09-22 13:46:35 +02:00
committed by GitHub
parent 4b49782fac
commit f35eb2a2f4
2 changed files with 2 additions and 1 deletions

View File

@@ -88,7 +88,7 @@
</p>
{% endif %}
</div>
{% elif not can_download and ticket_download_date %}
{% elif not can_download and plugins_allow_ticket_download and ticket_download_date %}
{% if order.status == 'p' %}
<div class="alert alert-info info-download">
{% blocktrans trimmed with date=ticket_download_date|date:"SHORT_DATE_FORMAT" %}

View File

@@ -177,6 +177,7 @@ class TicketPageMixin:
ctx['order'] = self.order
can_download = all([r for rr, r in allow_ticket_download.send(self.request.event, order=self.order)])
ctx['plugins_allow_ticket_download'] = can_download
if self.request.event.settings.ticket_download_date:
ctx['ticket_download_date'] = self.order.ticket_download_date
can_download = (