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

Fixes #6070: Add missing 'count_ipaddresses' attribute to VMInterface serializer

This commit is contained in:
jeremystretch
2021-04-08 14:22:45 -04:00
parent f096c4a5d0
commit e69251b21a
4 changed files with 8 additions and 6 deletions

View File

@ -109,12 +109,13 @@ class VMInterfaceSerializer(TaggedObjectSerializer, ValidatedModelSerializer):
required=False,
many=True
)
count_ipaddresses = serializers.IntegerField(read_only=True)
class Meta:
model = VMInterface
fields = [
'id', 'url', 'virtual_machine', 'name', 'enabled', 'mtu', 'mac_address', 'description', 'mode',
'untagged_vlan', 'tagged_vlans', 'tags',
'untagged_vlan', 'tagged_vlans', 'tags', 'count_ipaddresses',
]
def validate(self, data):