Arthur 1 week geleden
bovenliggende
commit
ebe3b48006
3 gewijzigde bestanden met toevoegingen van 7 en 7 verwijderingen
  1. 3 3
      netbox/dcim/api/serializers_/cooling.py
  2. 3 3
      netbox/dcim/tables/cooling.py
  3. 1 1
      netbox/dcim/tests/test_api.py

+ 3 - 3
netbox/dcim/api/serializers_/cooling.py

@@ -39,16 +39,16 @@ class CoolingSourceSerializer(PrimaryModelSerializer):
     )
 
     # Related object counts
-    cooling_feed_count = RelatedObjectCountField('cooling_feeds')
+    coolingfeed_count = RelatedObjectCountField('cooling_feeds')
 
     class Meta:
         model = CoolingSource
         fields = [
             'id', 'url', 'display_url', 'display', 'site', 'location', 'name', 'type', 'status', 'cooling_capacity',
             'supply_temperature', 'return_temperature', 'temperature_unit', 'description', 'owner', 'comments', 'tags',
-            'custom_fields', 'cooling_feed_count', 'created', 'last_updated',
+            'custom_fields', 'coolingfeed_count', 'created', 'last_updated',
         ]
-        brief_fields = ('id', 'url', 'display', 'name', 'description', 'cooling_feed_count')
+        brief_fields = ('id', 'url', 'display', 'name', 'description', 'coolingfeed_count')
 
 
 class CoolingFeedSerializer(PrimaryModelSerializer, CabledObjectSerializer, ConnectedEndpointsSerializer):

+ 3 - 3
netbox/dcim/tables/cooling.py

@@ -65,7 +65,7 @@ class CoolingSourceTable(ContactsColumnMixin, PrimaryModelTable):
     temperature_unit = columns.ChoiceFieldColumn(
         verbose_name=_('Temperature Unit'),
     )
-    cooling_feed_count = columns.LinkedCountColumn(
+    coolingfeed_count = columns.LinkedCountColumn(
         viewname='dcim:coolingfeed_list',
         url_params={'cooling_source_id': 'pk'},
         verbose_name=_('Cooling Feeds')
@@ -78,11 +78,11 @@ class CoolingSourceTable(ContactsColumnMixin, PrimaryModelTable):
         model = CoolingSource
         fields = (
             'pk', 'id', 'name', 'site', 'location', 'type', 'status', 'cooling_capacity', 'supply_temperature',
-            'return_temperature', 'temperature_unit', 'cooling_feed_count', 'contacts', 'description', 'comments',
+            'return_temperature', 'temperature_unit', 'coolingfeed_count', 'contacts', 'description', 'comments',
             'tags', 'created', 'last_updated',
         )
         default_columns = (
-            'pk', 'name', 'site', 'location', 'type', 'status', 'cooling_capacity', 'cooling_feed_count',
+            'pk', 'name', 'site', 'location', 'type', 'status', 'cooling_capacity', 'coolingfeed_count',
         )
 
 

+ 1 - 1
netbox/dcim/tests/test_api.py

@@ -4008,7 +4008,7 @@ class CoolingOutletTestCase(Mixins.ComponentTraceMixin, APIViewTestCases.APIView
 
 class CoolingSourceTestCase(APIViewTestCases.APIViewTestCase):
     model = CoolingSource
-    brief_fields = ['cooling_feed_count', 'description', 'display', 'id', 'name', 'url']
+    brief_fields = ['coolingfeed_count', 'description', 'display', 'id', 'name', 'url']
     user_permissions = ('dcim.view_site', )
 
     @classmethod