fix view demand authorization

This commit is contained in:
Cayo Puigdefabregas 2023-11-29 11:53:30 +01:00
parent c6d0cd2b5b
commit 7d477a079b
2 changed files with 1 additions and 3 deletions

View File

@ -80,7 +80,6 @@ class DemandAuthorizationForm(forms.Form):
if commit: if commit:
url = self.org.demand_authorization() url = self.org.demand_authorization()
auth = (self.org.client_id, self.org.client_secret)
if url.status_code == 200: if url.status_code == 200:
return url.json().get('redirect_uri') return url.json().get('redirect_uri')

View File

@ -160,9 +160,8 @@ class DemandAuthorizationView(MyWallet, FormView):
def form_valid(self, form): def form_valid(self, form):
authorization = form.save() authorization = form.save()
# import pdb; pdb.set_trace()
if authorization: if authorization:
redirect(authorization) return redirect(authorization)
else: else:
messages.error(self.request, _("Error sending credential!")) messages.error(self.request, _("Error sending credential!"))
return super().form_valid(form) return super().form_valid(form)