mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-25 01:48:38 -06:00
Clean up stray references to old RackGroup model
This commit is contained in:
parent
65ed047084
commit
0bce1da4e3
@ -142,7 +142,7 @@ class SiteViewSet(CustomFieldModelViewSet):
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Rack groups
|
# Locations
|
||||||
#
|
#
|
||||||
|
|
||||||
class LocationViewSet(CustomFieldModelViewSet):
|
class LocationViewSet(CustomFieldModelViewSet):
|
||||||
|
@ -1349,7 +1349,7 @@ class PowerPanelFilterSet(BaseFilterSet):
|
|||||||
queryset=Location.objects.all(),
|
queryset=Location.objects.all(),
|
||||||
field_name='location',
|
field_name='location',
|
||||||
lookup_expr='in',
|
lookup_expr='in',
|
||||||
label='Rack group (ID)',
|
label='Location (ID)',
|
||||||
)
|
)
|
||||||
tag = TagFilter()
|
tag = TagFilter()
|
||||||
|
|
||||||
|
@ -521,9 +521,9 @@ class LocationCSVForm(CustomFieldModelCSVForm):
|
|||||||
queryset=Location.objects.all(),
|
queryset=Location.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
to_field_name='name',
|
to_field_name='name',
|
||||||
help_text='Parent rack group',
|
help_text='Parent location',
|
||||||
error_messages={
|
error_messages={
|
||||||
'invalid_choice': 'Rack group not found.',
|
'invalid_choice': 'Location not found.',
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -66,9 +66,9 @@ class PowerPanel(PrimaryModel):
|
|||||||
|
|
||||||
# Location must belong to assigned Site
|
# Location must belong to assigned Site
|
||||||
if self.location and self.location.site != self.site:
|
if self.location and self.location.site != self.site:
|
||||||
raise ValidationError("Rack group {} ({}) is in a different site than {}".format(
|
raise ValidationError(
|
||||||
self.location, self.location.site, self.site
|
f"Location {self.location} ({self.location.site}) is in a different site than {self.site}"
|
||||||
))
|
)
|
||||||
|
|
||||||
|
|
||||||
@extras_features('custom_fields', 'custom_links', 'export_templates', 'webhooks')
|
@extras_features('custom_fields', 'custom_links', 'export_templates', 'webhooks')
|
||||||
|
Loading…
Reference in New Issue
Block a user