mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Housekeeping: Use RestrictedQuerySet for default manager on base models
This commit is contained in:
@@ -7,7 +7,6 @@ from mptt.models import TreeForeignKey
|
||||
from extras.utils import extras_features
|
||||
from netbox.models import ChangeLoggedModel, NestedGroupModel, OrganizationalModel, PrimaryModel
|
||||
from tenancy.choices import *
|
||||
from utilities.querysets import RestrictedQuerySet
|
||||
|
||||
__all__ = (
|
||||
'ContactAssignment',
|
||||
@@ -69,8 +68,6 @@ class ContactRole(OrganizationalModel):
|
||||
blank=True,
|
||||
)
|
||||
|
||||
objects = RestrictedQuerySet.as_manager()
|
||||
|
||||
class Meta:
|
||||
ordering = ['name']
|
||||
|
||||
@@ -115,8 +112,6 @@ class Contact(PrimaryModel):
|
||||
blank=True
|
||||
)
|
||||
|
||||
objects = RestrictedQuerySet.as_manager()
|
||||
|
||||
clone_fields = [
|
||||
'group',
|
||||
]
|
||||
@@ -161,8 +156,6 @@ class ContactAssignment(ChangeLoggedModel):
|
||||
blank=True
|
||||
)
|
||||
|
||||
objects = RestrictedQuerySet.as_manager()
|
||||
|
||||
clone_fields = ('content_type', 'object_id')
|
||||
|
||||
class Meta:
|
||||
|
@@ -5,7 +5,6 @@ from mptt.models import TreeForeignKey
|
||||
|
||||
from extras.utils import extras_features
|
||||
from netbox.models import NestedGroupModel, PrimaryModel
|
||||
from utilities.querysets import RestrictedQuerySet
|
||||
|
||||
__all__ = (
|
||||
'Tenant',
|
||||
@@ -80,8 +79,6 @@ class Tenant(PrimaryModel):
|
||||
to='tenancy.ContactAssignment'
|
||||
)
|
||||
|
||||
objects = RestrictedQuerySet.as_manager()
|
||||
|
||||
clone_fields = [
|
||||
'group', 'description',
|
||||
]
|
||||
|
Reference in New Issue
Block a user