fix(app): orgunits view should now work
This commit is contained in:
1 parent
f7ee851f25
commit
3ae2b10cba
1 file changed
+1
-1
+1
-1
@@ -128,7 +128,7 @@ class MyOrgUnitViewSet(viewsets.ReadOnlyModelViewSet):
|
||||
if self.request.user.is_superuser:
|
||||
return orgunits
|
||||
|
||||
return orgunits.filter(admin_groups__in=self.request.user.groups)
|
||||
return orgunits.filter(admin_groups__in=self.request.user.groups.all())
|
||||
|
||||
|
||||
class OrgUnitViewSet(viewsets.ReadOnlyModelViewSet):
|
||||
|
||||
Reference in new issue
Block a user