fix response with problems in connections
This commit is contained in:
parent
4f1a5afea7
commit
89f1668c5c
|
@ -159,7 +159,15 @@ class DemandAuthorizationView(MyWallet, FormView):
|
|||
return kwargs
|
||||
|
||||
def form_valid(self, form):
|
||||
try:
|
||||
authorization = form.save()
|
||||
except Exception:
|
||||
txt = _("Problems connecting with {url}").format(
|
||||
url=form.org.response_uri
|
||||
)
|
||||
messages.error(self.request, txt)
|
||||
return super().form_valid(form)
|
||||
|
||||
if authorization:
|
||||
return redirect(authorization)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue