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
|
return kwargs
|
||||||
|
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
authorization = form.save()
|
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:
|
if authorization:
|
||||||
return redirect(authorization)
|
return redirect(authorization)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue