mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Move ObjectChange creation into signal receivers
This commit is contained in:
@@ -3,20 +3,6 @@ from django.db.models import Q, QuerySet
|
||||
from utilities.permissions import permission_is_exempt
|
||||
|
||||
|
||||
class DummyQuerySet:
|
||||
"""
|
||||
A fake QuerySet that can be used to cache relationships to objects that have been deleted.
|
||||
"""
|
||||
def __init__(self, queryset):
|
||||
self._cache = [obj for obj in queryset.all()]
|
||||
|
||||
def __iter__(self):
|
||||
return iter(self._cache)
|
||||
|
||||
def all(self):
|
||||
return self._cache
|
||||
|
||||
|
||||
class RestrictedQuerySet(QuerySet):
|
||||
|
||||
def restrict(self, user, action='view'):
|
||||
|
Reference in New Issue
Block a user