fix view demand authorization
This commit is contained in:
parent
c6d0cd2b5b
commit
7d477a079b
|
@ -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')
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue