Added mac_address to IPAddressInterfaceSerializer

We use Netbox to fill our dhcp server. With the mac_address in the IPAddressSerializer we only have to do one call to get all the information.
This commit is contained in:
Thomas van der Jagt 2018-07-18 14:09:16 +02:00 committed by GitHub
parent 786f389be8
commit 8aa5f28bc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -275,7 +275,7 @@ class IPAddressInterfaceSerializer(serializers.ModelSerializer):
class Meta(InterfaceSerializer.Meta): class Meta(InterfaceSerializer.Meta):
model = Interface model = Interface
fields = [ fields = [
'id', 'url', 'device', 'virtual_machine', 'name', 'id', 'url', 'device', 'virtual_machine', 'name', 'mac_address',
] ]
def get_url(self, obj): def get_url(self, obj):