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:
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')

View File

@ -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)