Commit 5e179385 authored by Gladys Forte's avatar Gladys Forte

{dev bugfix} print

parent b8b9b93c
...@@ -27,15 +27,23 @@ class UserDownloadRequest(XLSXFileMixin, ReadOnlyModelViewSet): ...@@ -27,15 +27,23 @@ class UserDownloadRequest(XLSXFileMixin, ReadOnlyModelViewSet):
company = self.request.user.department.company.code company = self.request.user.department.company.code
department = self.request.user.department.code department = self.request.user.department.code
print(user_type)
print(company)
print(department)
if user_type == 'CUA': if user_type == 'CUA':
print('cua')
data = User.objects.filter( data = User.objects.filter(
department__company=company).exclude(id=1) department__company=company).exclude(id=1)
elif user_type == 'DUA': elif user_type == 'DUA':
print('dua')
data = User.objects.filter( data = User.objects.filter(
department=department).exclude(id=1) department=department).exclude(id=1)
elif user_type == 'SU': elif user_type == 'SU':
print('su')
data = User.objects.all().exclude(id=1) data = User.objects.all().exclude(id=1)
elif user_type == 'OUA': elif user_type == 'OUA':
print('oua')
data = User.objects.all().exclude(id=1) data = User.objects.all().exclude(id=1)
else: else:
return Response( return Response(
......
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