This commit is contained in:
Cayo Puigdefabregas 2024-01-21 14:27:21 +01:00
parent 9522e92781
commit acbe778197

View file

@ -171,9 +171,10 @@ class AllowCodeView(View):
code=code,
code_used=False
)
if not self.authorization.promotions.exists():
promotion = self.authorization.promotions.first()
if not promotion:
raise Http404("Page not Found!")
promotion = self.authorization.promotions.all()[0]
return redirect(promotion.get_url(code))