mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -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):
|
||||
|
@ -1349,7 +1349,7 @@ class PowerPanelFilterSet(BaseFilterSet):
|
||||
queryset=Location.objects.all(),
|
||||
field_name='location',
|
||||
lookup_expr='in',
|
||||
label='Rack group (ID)',
|
||||
label='Location (ID)',
|
||||
)
|
||||
tag = TagFilter()
|
||||
|
||||
|
@ -521,9 +521,9 @@ class LocationCSVForm(CustomFieldModelCSVForm):
|
||||
queryset=Location.objects.all(),
|
||||
required=False,
|
||||
to_field_name='name',
|
||||
help_text='Parent rack group',
|
||||
help_text='Parent location',
|
||||
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
|
||||
if self.location and self.location.site != self.site:
|
||||
raise ValidationError("Rack group {} ({}) is in a different site than {}".format(
|
||||
self.location, self.location.site, self.site
|
||||
))
|
||||
raise ValidationError(
|
||||
f"Location {self.location} ({self.location.site}) is in a different site than {self.site}"
|
||||
)
|
||||
|
||||
|
||||
@extras_features('custom_fields', 'custom_links', 'export_templates', 'webhooks')
|
||||
|
Loading…
Reference in New Issue
Block a user