forked from CGM_Public/pretix_original
PDF Output: Prevent subsequent exception on permission errors
This commit is contained in:
@@ -26,7 +26,7 @@ def register_data(sender, **kwargs):
|
|||||||
@receiver(html_head, dispatch_uid="ticketoutputpdf_html_head")
|
@receiver(html_head, dispatch_uid="ticketoutputpdf_html_head")
|
||||||
def html_head_presale(sender, request=None, **kwargs):
|
def html_head_presale(sender, request=None, **kwargs):
|
||||||
url = resolve(request.path_info)
|
url = resolve(request.path_info)
|
||||||
if url.namespace == 'plugins:ticketoutputpdf':
|
if url.namespace == 'plugins:ticketoutputpdf' and getattr(request, 'organizer', None):
|
||||||
template = get_template('pretixplugins/ticketoutputpdf/control_head.html')
|
template = get_template('pretixplugins/ticketoutputpdf/control_head.html')
|
||||||
return template.render({
|
return template.render({
|
||||||
'request': request
|
'request': request
|
||||||
|
|||||||
Reference in New Issue
Block a user