Skip to content

Commit

Permalink
Fixes netbox-community#9592: Remove member_count from NestedVirtualCh…
Browse files Browse the repository at this point in the history
…assisSerializer
  • Loading branch information
amhn committed Aug 29, 2022
1 parent 83db8d2 commit e3a71ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions netbox/dcim/api/nested_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,11 +432,10 @@ class Meta:
class NestedVirtualChassisSerializer(WritableNestedSerializer):
url = serializers.HyperlinkedIdentityField(view_name='dcim-api:virtualchassis-detail')
master = NestedDeviceSerializer()
member_count = serializers.IntegerField(read_only=True)

class Meta:
model = models.VirtualChassis
fields = ['id', 'url', 'display', 'name', 'master', 'member_count']
fields = ['id', 'url', 'display', 'name', 'master']


#
Expand Down
2 changes: 1 addition & 1 deletion netbox/dcim/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,7 @@ def test_get_connected_device(self):

class VirtualChassisTest(APIViewTestCases.APIViewTestCase):
model = VirtualChassis
brief_fields = ['display', 'id', 'master', 'member_count', 'name', 'url']
brief_fields = ['display', 'id', 'master', 'name', 'url']

@classmethod
def setUpTestData(cls):
Expand Down

0 comments on commit e3a71ce

Please sign in to comment.