Merge "Fix bad parsing of HTTP response"
This commit is contained in:
commit
024f584378
@ -131,7 +131,7 @@ class CreateForm(forms.SelfHandlingForm):
|
|||||||
messages.success(request, message)
|
messages.success(request, message)
|
||||||
return audit_tpl
|
return audit_tpl
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
msg = _('Failed to create audit template"%s".') % data['name']
|
msg = _('Failed to create audit template.')
|
||||||
LOG.info(exc)
|
LOG.info(exc)
|
||||||
redirect = reverse(self.failure_url)
|
redirect = reverse(self.failure_url)
|
||||||
exceptions.handle(request, msg, redirect=redirect)
|
exceptions.handle(request, msg, redirect=redirect)
|
||||||
|
@ -97,10 +97,10 @@ class CreateForm(forms.SelfHandlingForm):
|
|||||||
messages.success(request, message)
|
messages.success(request, message)
|
||||||
return audit
|
return audit
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
if exc.status_code == 409:
|
if exc.http_status == 409:
|
||||||
msg = _('Quota exceeded for resource audit.')
|
msg = _('Quota exceeded for resource audit.')
|
||||||
else:
|
else:
|
||||||
msg = _('Failed to create audit "%s".') % data['name']
|
msg = _('Failed to create audit.')
|
||||||
LOG.info(exc)
|
LOG.info(exc)
|
||||||
redirect = reverse(self.failure_url)
|
redirect = reverse(self.failure_url)
|
||||||
exceptions.handle(request, msg, redirect=redirect)
|
exceptions.handle(request, msg, redirect=redirect)
|
||||||
|
Loading…
Reference in New Issue
Block a user