1
0
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:
jeremystretch
2021-11-11 15:04:22 -05:00
parent 834f68e6e4
commit d529c1b5b3
21 changed files with 7 additions and 108 deletions

View File

@ -13,7 +13,6 @@ from netbox.models import OrganizationalModel, PrimaryModel
from utilities.fields import NaturalOrderingField
from utilities.ordering import naturalize_interface
from utilities.query_functions import CollateAsChar
from utilities.querysets import RestrictedQuerySet
from .choices import *
@ -48,8 +47,6 @@ class ClusterType(OrganizationalModel):
blank=True
)
objects = RestrictedQuerySet.as_manager()
class Meta:
ordering = ['name']
@ -93,8 +90,6 @@ class ClusterGroup(OrganizationalModel):
to='tenancy.ContactAssignment'
)
objects = RestrictedQuerySet.as_manager()
class Meta:
ordering = ['name']
@ -158,8 +153,6 @@ class Cluster(PrimaryModel):
to='tenancy.ContactAssignment'
)
objects = RestrictedQuerySet.as_manager()
clone_fields = [
'type', 'group', 'tenant', 'site',
]
@ -405,8 +398,6 @@ class VMInterface(PrimaryModel, BaseInterface):
related_query_name='+'
)
objects = RestrictedQuerySet.as_manager()
class Meta:
verbose_name = 'interface'
ordering = ('virtual_machine', CollateAsChar('_name'))