Merge pull request #4289 from AlanCoding/org_sublist_fix

Avoid applying system auditor prop if action was association
This commit is contained in:
Alan Rominger
2016-12-05 16:58:28 -05:00
committed by GitHub
2 changed files with 16 additions and 1 deletions

View File

@@ -768,7 +768,7 @@ class BaseUsersList(SubListCreateAttachDetachAPIView):
def post(self, request, *args, **kwargs):
ret = super(BaseUsersList, self).post( request, *args, **kwargs)
try:
if 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
# auditor role member list.. unfortunately this means we can't
# set it on creation, and thus needs to be set here.