From f369e3ba0fd1963db3377426ecb67a2fb1926bd5 Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Fri, 6 Apr 2018 14:04:51 -0400 Subject: [PATCH] handle 400 error creating sys auditor --- awx/api/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/awx/api/views.py b/awx/api/views.py index 812e0168e2..05c15b9243 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -995,6 +995,8 @@ class OrganizationInventoriesList(SubListAPIView): class BaseUsersList(SubListCreateAttachDetachAPIView): def post(self, request, *args, **kwargs): ret = super(BaseUsersList, self).post( request, *args, **kwargs) + if ret.status_code != 201: + return ret try: if ret.data is not None and request.data.get('is_system_auditor', False): # This is a faux-field that just maps to checking the system