This commit is contained in:
Cayo Puigdefabregas 2023-12-11 15:50:33 +01:00
parent 0a8690659f
commit 7b46501289
1 changed files with 2 additions and 2 deletions

View File

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