mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-20 19:19:22 -06:00
* Fixes #15133: Fix FHRP group representation on assignments endpoint under brief mode * Update API test
This commit is contained in:
parent
c37dfdc150
commit
12d830bcf2
@ -116,10 +116,11 @@ class NestedFHRPGroupSerializer(WritableNestedSerializer):
|
|||||||
|
|
||||||
class NestedFHRPGroupAssignmentSerializer(WritableNestedSerializer):
|
class NestedFHRPGroupAssignmentSerializer(WritableNestedSerializer):
|
||||||
url = serializers.HyperlinkedIdentityField(view_name='ipam-api:fhrpgroupassignment-detail')
|
url = serializers.HyperlinkedIdentityField(view_name='ipam-api:fhrpgroupassignment-detail')
|
||||||
|
group = NestedFHRPGroupSerializer()
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = models.FHRPGroupAssignment
|
model = models.FHRPGroupAssignment
|
||||||
fields = ['id', 'url', 'display', 'interface_type', 'interface_id', 'group_id', 'priority']
|
fields = ['id', 'url', 'display', 'group', 'interface_type', 'interface_id', 'priority']
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -760,7 +760,7 @@ class FHRPGroupTest(APIViewTestCases.APIViewTestCase):
|
|||||||
|
|
||||||
class FHRPGroupAssignmentTest(APIViewTestCases.APIViewTestCase):
|
class FHRPGroupAssignmentTest(APIViewTestCases.APIViewTestCase):
|
||||||
model = FHRPGroupAssignment
|
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 = {
|
bulk_update_data = {
|
||||||
'priority': 100,
|
'priority': 100,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user