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

@ -18,7 +18,6 @@ from netbox.config import get_config
from netbox.models import OrganizationalModel, PrimaryModel
from utilities.choices import ColorChoices
from utilities.fields import ColorField, NaturalOrderingField
from utilities.querysets import RestrictedQuerySet
from utilities.utils import array_to_string
from .device_components import PowerOutlet, PowerPort
from .devices import Device
@ -56,8 +55,6 @@ class RackRole(OrganizationalModel):
blank=True,
)
objects = RestrictedQuerySet.as_manager()
class Meta:
ordering = ['name']
@ -190,8 +187,6 @@ class Rack(PrimaryModel):
to='extras.ImageAttachment'
)
objects = RestrictedQuerySet.as_manager()
clone_fields = [
'site', 'location', 'tenant', 'status', 'role', 'type', 'width', 'u_height', 'desc_units', 'outer_width',
'outer_depth', 'outer_unit',
@ -471,8 +466,6 @@ class RackReservation(PrimaryModel):
max_length=200
)
objects = RestrictedQuerySet.as_manager()
class Meta:
ordering = ['created', 'pk']