Skip to content

Commit

Permalink
Fix QR from displaying checkin code on registration
Browse files Browse the repository at this point in the history
  • Loading branch information
bubner committed Jan 24, 2024
1 parent dfd3e5f commit eacd2bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/img.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def generate_qrcode(event, size, qr_type) -> BytesIO:
@return: QR code image as a BytesIO object
"""
img = qrcode.make(
f"https://rbreg.vercel.app/events/{qr_type}/{event.get('uid')}?code={event.get('checkin_code')}",
f"https://rbreg.vercel.app/events/{qr_type}/{event.get('uid')}" + f"?code={event.get('checkin_code')}" if qr_type == "ci" else "",
version=1,
error_correction=qrcode.constants.ERROR_CORRECT_L if size == "large" else qrcode.constants.ERROR_CORRECT_H,
box_size=20 if size == "large" else 16,
Expand Down

0 comments on commit eacd2bd

Please sign in to comment.