mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
TreeManager should provide an unrestricted QuerySet for MPTT use
This commit is contained in:
@@ -16,4 +16,8 @@ class TreeManager(Manager.from_queryset(TreeQuerySet), TreeManager_):
|
||||
"""
|
||||
Extend django-mptt's TreeManager to incorporate RestrictedQuerySet().
|
||||
"""
|
||||
pass
|
||||
def db_manager(self, using=None, hints=None):
|
||||
manager = super().db_manager(using, hints)
|
||||
|
||||
# Return an unrestricted QuerySet for use by MPTT
|
||||
return manager.unrestricted()
|
||||
|
Reference in New Issue
Block a user