fix
This commit is contained in:
parent
0a8690659f
commit
7b46501289
|
@ -145,9 +145,9 @@ class AllowCodeView(View):
|
||||||
code=code,
|
code=code,
|
||||||
code_used=False
|
code_used=False
|
||||||
)
|
)
|
||||||
if not self.authorization.promotions:
|
if not self.authorization.promotions.exists():
|
||||||
raise Http404("Page not Found!")
|
raise Http404("Page not Found!")
|
||||||
|
|
||||||
promotion = self.authorization.promotions[0]
|
promotion = self.authorization.promotions.all()[0]
|
||||||
return redirect(promotion.get_url(code))
|
return redirect(promotion.get_url(code))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue