Commit 3f6cb6b1 authored by Gladys Forte's avatar Gladys Forte

{dev bugfix} print

parent 4d476ee3
......@@ -31,17 +31,22 @@ class UserDownloadRequest(XLSXFileMixin, ReadOnlyModelViewSet):
user_type = data.values_list('user_type', flat=True)[0]
if user_type == 'CUA':
print(user_type)
code = data.values_list('department__company', flat=True)[0]
data = User.objects.filter(
department__company=code).exclude(id=1)
elif user_type == 'DUA':
print(user_type)
code = data.values_list('department', flat=True)[0]
data = User.objects.filter(
department=code).exclude(id=1)
elif user_type == 'SU':
print(user_type)
data = User.objects.all().exclude(id=1)
elif user_type == 'OUA':
print(user_type)
data = User.objects.all().exclude(id=1)
else:
return Response(
{"message": "Logged user is unauthorize to access this section"},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment