From 7b46501289d5fa9db2203ada918424b30ab887cf Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 11 Dec 2023 15:50:33 +0100 Subject: [PATCH] fix --- oidc4vp/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oidc4vp/views.py b/oidc4vp/views.py index ea592d4..fd164bf 100644 --- a/oidc4vp/views.py +++ b/oidc4vp/views.py @@ -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))