Commit f8099a8f authored by John Red Medrano's avatar John Red Medrano

add role on company list at create user, when the logged user_type is DUA it will list own company

parent 5201d429
......@@ -145,7 +145,7 @@ class rms:
@wraps(function)
def wrapper(self, request, *args, **kwargs):
if rms.user_type(self) == rms.enums_company:
if rms.user_type(self) == rms.enums_company or rms.user_type(self) == rms.enums_department:
id = rms.user(self).department.company.id
self.queryset = self.queryset.filter(
......
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