1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fix ObjectPermission attribute consolidation

This commit is contained in:
Jeremy Stretch
2020-05-12 16:40:04 -04:00
parent a275a30dca
commit 94d0ebbd7d
4 changed files with 8 additions and 8 deletions

View File

@ -28,7 +28,7 @@ class ObjectPermissionRequiredMixin(AccessMixin):
attrs = ObjectPermission.objects.get_attr_constraints(self.request.user, self.permission_required)
if attrs:
# Update the view's QuerySet to filter only the permitted objects
self.queryset = self.queryset.filter(**attrs)
self.queryset = self.queryset.filter(attrs)
return True
def dispatch(self, request, *args, **kwargs):