Skip to content

Commit

Permalink
Fix 500 error for promo codes
Browse files Browse the repository at this point in the history
Unlimited promo codes were breaking prereg
  • Loading branch information
kitsuta committed May 22, 2024
1 parent 3da46f7 commit 58a3d59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uber/forms/attendee.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def promo_code_valid(form, field):
else:
if code.is_expired:
raise ValidationError("That promo code has expired.")
elif code.uses_remaining <= 0 and not code.is_unlimited:
elif not code.is_unlimited and code.uses_remaining <= 0:
raise ValidationError("That promo code has been used already.")


Expand Down

0 comments on commit 58a3d59

Please sign in to comment.