1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

REST API optimizations

This commit is contained in:
jeremystretch
2021-11-02 14:08:36 -04:00
parent 2cb53a0f7e
commit 264652f2c3
3 changed files with 8 additions and 4 deletions

View File

@@ -98,12 +98,13 @@ class AggregateSerializer(PrimaryModelSerializer):
class FHRPGroupSerializer(PrimaryModelSerializer):
url = serializers.HyperlinkedIdentityField(view_name='ipam-api:fhrpgroup-detail')
ip_addresses = NestedIPAddressSerializer(many=True, read_only=True)
class Meta:
model = FHRPGroup
fields = [
'id', 'url', 'display', 'protocol', 'group_id', 'auth_type', 'auth_key', 'description', 'tags',
'custom_fields', 'created', 'last_updated',
'id', 'url', 'display', 'protocol', 'group_id', 'auth_type', 'auth_key', 'description', 'ip_addresses',
'tags', 'custom_fields', 'created', 'last_updated',
]