From 7d477a079b2735a69357a6a1b7e0ac876c730132 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 29 Nov 2023 11:53:30 +0100 Subject: [PATCH] fix view demand authorization --- idhub/user/forms.py | 1 - idhub/user/views.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/idhub/user/forms.py b/idhub/user/forms.py index cce197c..16151bb 100644 --- a/idhub/user/forms.py +++ b/idhub/user/forms.py @@ -80,7 +80,6 @@ class DemandAuthorizationForm(forms.Form): if commit: url = self.org.demand_authorization() - auth = (self.org.client_id, self.org.client_secret) if url.status_code == 200: return url.json().get('redirect_uri') diff --git a/idhub/user/views.py b/idhub/user/views.py index 09eae35..0d0cb35 100644 --- a/idhub/user/views.py +++ b/idhub/user/views.py @@ -160,9 +160,8 @@ class DemandAuthorizationView(MyWallet, FormView): def form_valid(self, form): authorization = form.save() - # import pdb; pdb.set_trace() if authorization: - redirect(authorization) + return redirect(authorization) else: messages.error(self.request, _("Error sending credential!")) return super().form_valid(form)