Commit f588bccb authored by Gladys Forte's avatar Gladys Forte

Merge branch 'prod-dev-gladys' into 'product-dev'

{dev bugfix} print1

See merge request rms/Backend/api-main-service!855
parents b10ec397 7638a232
...@@ -30,21 +30,20 @@ class UserDownloadRequest(XLSXFileMixin, ReadOnlyModelViewSet): ...@@ -30,21 +30,20 @@ class UserDownloadRequest(XLSXFileMixin, ReadOnlyModelViewSet):
data = User.objects.all().exclude(id=1) data = User.objects.all().exclude(id=1)
user_type = data.values_list('user_type', flat=True)[0] user_type = data.values_list('user_type', flat=True)[0]
print("this")
print(user_type)
if user_type == 'CUA': if user_type == 'CUA':
print(user_type)
code = data.values_list('department__company', flat=True)[0] code = data.values_list('department__company', flat=True)[0]
data = User.objects.filter( data = User.objects.filter(
department__company=code).exclude(id=1) department__company=code).exclude(id=1)
elif user_type == 'DUA': elif user_type == 'DUA':
print(user_type)
code = data.values_list('department', flat=True)[0] code = data.values_list('department', flat=True)[0]
data = User.objects.filter( data = User.objects.filter(
department=code).exclude(id=1) department=code).exclude(id=1)
elif user_type == 'SU': elif user_type == 'SU':
print(user_type)
data = User.objects.all().exclude(id=1) data = User.objects.all().exclude(id=1)
elif user_type == 'OUA': elif user_type == 'OUA':
print(user_type)
data = User.objects.all().exclude(id=1) data = User.objects.all().exclude(id=1)
else: else:
......
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