From 0bce1da4e3793f6a8b279c74c02af2148ddf4c0a Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Sun, 11 Apr 2021 13:43:06 -0400 Subject: [PATCH] Clean up stray references to old RackGroup model --- netbox/dcim/api/views.py | 2 +- netbox/dcim/filters.py | 2 +- netbox/dcim/forms.py | 4 ++-- netbox/dcim/models/power.py | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/netbox/dcim/api/views.py b/netbox/dcim/api/views.py index 26313474c..cb46c1eca 100644 --- a/netbox/dcim/api/views.py +++ b/netbox/dcim/api/views.py @@ -142,7 +142,7 @@ class SiteViewSet(CustomFieldModelViewSet): # -# Rack groups +# Locations # class LocationViewSet(CustomFieldModelViewSet): diff --git a/netbox/dcim/filters.py b/netbox/dcim/filters.py index 1a7ac266f..4beed04b1 100644 --- a/netbox/dcim/filters.py +++ b/netbox/dcim/filters.py @@ -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() diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py index 9437225de..feb8c5e81 100644 --- a/netbox/dcim/forms.py +++ b/netbox/dcim/forms.py @@ -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.', } ) diff --git a/netbox/dcim/models/power.py b/netbox/dcim/models/power.py index 06d234149..a5e3149f8 100644 --- a/netbox/dcim/models/power.py +++ b/netbox/dcim/models/power.py @@ -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')