forked from CGM_Public/pretix_original
PDF renderer: Do not break on wrong poweredby-styles
This commit is contained in:
@@ -216,6 +216,8 @@ class Renderer:
|
|||||||
|
|
||||||
def _draw_poweredby(self, canvas: Canvas, op: OrderPosition, o: dict):
|
def _draw_poweredby(self, canvas: Canvas, op: OrderPosition, o: dict):
|
||||||
content = o.get('content', 'dark')
|
content = o.get('content', 'dark')
|
||||||
|
if content not in ('dark', 'white'):
|
||||||
|
content = 'dark'
|
||||||
img = finders.find('pretixpresale/pdf/powered_by_pretix_{}.png'.format(content))
|
img = finders.find('pretixpresale/pdf/powered_by_pretix_{}.png'.format(content))
|
||||||
|
|
||||||
ir = ThumbnailingImageReader(img)
|
ir = ThumbnailingImageReader(img)
|
||||||
|
|||||||
Reference in New Issue
Block a user