remove duplicate BaseUsersList

This commit is contained in:
Wayne Witzel III
2018-10-03 09:27:43 -04:00
parent 198a0db808
commit 1b465c4ed9
2 changed files with 1 additions and 20 deletions

View File

@@ -134,25 +134,6 @@ class OrganizationInventoriesList(SubListAPIView):
relationship = 'inventories'
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
# auditor role member list.. unfortunately this means we can't
# set it on creation, and thus needs to be set here.
user = User.objects.get(id=ret.data['id'])
user.is_system_auditor = request.data['is_system_auditor']
ret.data['is_system_auditor'] = request.data['is_system_auditor']
except AttributeError as exc:
print(exc)
pass
return ret
class OrganizationUsersList(BaseUsersList):
model = User