Skip to content

Commit

Permalink
Fixes #15133: Fix FHRP group representation on assignments endpoint u…
Browse files Browse the repository at this point in the history
…nder brief mode (#15134)

* Fixes #15133: Fix FHRP group representation on assignments endpoint under brief mode

* Update API test
  • Loading branch information
jeremystretch committed Feb 13, 2024
1 parent 0c3875d commit 1ebd0a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion netbox/ipam/api/nested_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ class Meta:

class NestedFHRPGroupAssignmentSerializer(WritableNestedSerializer):
url = serializers.HyperlinkedIdentityField(view_name='ipam-api:fhrpgroupassignment-detail')
group = NestedFHRPGroupSerializer()

class Meta:
model = models.FHRPGroupAssignment
fields = ['id', 'url', 'display', 'interface_type', 'interface_id', 'group_id', 'priority']
fields = ['id', 'url', 'display', 'group', 'interface_type', 'interface_id', 'priority']


#
Expand Down
2 changes: 1 addition & 1 deletion netbox/ipam/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ def setUpTestData(cls):

class FHRPGroupAssignmentTest(APIViewTestCases.APIViewTestCase):
model = FHRPGroupAssignment
brief_fields = ['display', 'group_id', 'id', 'interface_id', 'interface_type', 'priority', 'url']
brief_fields = ['display', 'group', 'id', 'interface_id', 'interface_type', 'priority', 'url']
bulk_update_data = {
'priority': 100,
}
Expand Down

0 comments on commit 1ebd0a0

Please sign in to comment.