Skip to content

Commit b447490

Browse files
committed
qr code white background
1 parent 9ed712e commit b447490

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cabotage/server/user/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5668,7 +5668,10 @@ def account_security_qr():
56685668
if not uri.startswith("otpauth://"):
56695669
abort(400)
56705670

5671-
img = qrcode.make(uri, image_factory=qrcode.image.svg.SvgPathImage)
5671+
class TotpQrImage(qrcode.image.svg.SvgPathImage):
5672+
background = "#ffffff"
5673+
5674+
img = qrcode.make(uri, image_factory=TotpQrImage)
56725675
buf = io.BytesIO()
56735676
img.save(buf)
56745677
resp = make_response(buf.getvalue())

0 commit comments

Comments
 (0)