Skip to content

Commit 4323e50

Browse files
committed
Fix promo code validation
Because group promo codes actually change to individual promo codes once you claim them, our validation for not letting discounted badges use promo codes was tripping. We now just skip the validation if a badge already has a promo code.
1 parent 19056de commit 4323e50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

uber/validations/attendee.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def out_of_badge_type(form, field):
265265

266266
@PreregOtherInfo.new_or_changed('promo_code_code')
267267
def can_use_promo_code(form, field):
268-
if not field.data:
268+
if not field.data or form.model.promo_code:
269269
return
270270

271271
if form.model.badge_type == c.PSEUDO_DEALER_BADGE or getattr(form.model, 'is_dealer', False):

0 commit comments

Comments
 (0)