Fix SVG QR code generation

This commit is contained in:
Raphael Michel
2023-04-20 13:42:58 +02:00
parent 30a2d853fd
commit beea439df8

View File

@@ -1526,7 +1526,7 @@ class EventQRCode(EventPermissionRequiredMixin, View):
if filetype == 'svg':
factory = qrcode.image.svg.SvgPathImage
img = qrcode.make('Some data here', image_factory=factory)
img = qr.make_image(image_factory=factory)
r = HttpResponse(img.to_string(), content_type='image/svg+xml')
r['Content-Disposition'] = f'inline; filename="qrcode-{request.event.slug}.{filetype}"'
return r