Browse Source

Clean up stray references to old RackGroup model

jeremystretch 4 years ago
parent
commit
0bce1da4e3
4 changed files with 7 additions and 7 deletions
  1. 1 1
      netbox/dcim/api/views.py
  2. 1 1
      netbox/dcim/filters.py
  3. 2 2
      netbox/dcim/forms.py
  4. 3 3
      netbox/dcim/models/power.py

+ 1 - 1
netbox/dcim/api/views.py

@@ -142,7 +142,7 @@ class SiteViewSet(CustomFieldModelViewSet):
 
 
 #
-# Rack groups
+# Locations
 #
 
 class LocationViewSet(CustomFieldModelViewSet):

+ 1 - 1
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()
 

+ 2 - 2
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.',
         }
     )
 

+ 3 - 3
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')