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)
|
||||
return audit_tpl
|
||||
except Exception as exc:
|
||||
msg = _('Failed to create audit template"%s".') % data['name']
|
||||
msg = _('Failed to create audit template.')
|
||||
LOG.info(exc)
|
||||
redirect = reverse(self.failure_url)
|
||||
exceptions.handle(request, msg, redirect=redirect)
|
||||
|
@ -97,10 +97,10 @@ class CreateForm(forms.SelfHandlingForm):
|
||||
messages.success(request, message)
|
||||
return audit
|
||||
except Exception as exc:
|
||||
if exc.status_code == 409:
|
||||
if exc.http_status == 409:
|
||||
msg = _('Quota exceeded for resource audit.')
|
||||
else:
|
||||
msg = _('Failed to create audit "%s".') % data['name']
|
||||
msg = _('Failed to create audit.')
|
||||
LOG.info(exc)
|
||||
redirect = reverse(self.failure_url)
|
||||
exceptions.handle(request, msg, redirect=redirect)
|
||||
|
Loading…
Reference in New Issue
Block a user