mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 10:11:05 -03:30
Merge pull request #1272 from AlanCoding/user_create_err
handle 400 error creating sys auditor
This commit is contained in:
@@ -995,6 +995,8 @@ class OrganizationInventoriesList(SubListAPIView):
|
|||||||
class BaseUsersList(SubListCreateAttachDetachAPIView):
|
class BaseUsersList(SubListCreateAttachDetachAPIView):
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
ret = super(BaseUsersList, self).post( request, *args, **kwargs)
|
ret = super(BaseUsersList, self).post( request, *args, **kwargs)
|
||||||
|
if ret.status_code != 201:
|
||||||
|
return ret
|
||||||
try:
|
try:
|
||||||
if ret.data is not None and request.data.get('is_system_auditor', False):
|
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
|
# This is a faux-field that just maps to checking the system
|
||||||
|
|||||||
Reference in New Issue
Block a user