From 5975bb905e078c385609193a74de312033624539 Mon Sep 17 00:00:00 2001 From: chapeau Date: Tue, 4 Feb 2020 10:54:17 +0000 Subject: [PATCH] Add ip_type in dhcp api serializer --- api/serializers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/serializers.py b/api/serializers.py index ec4d0689..a2722d2a 100644 --- a/api/serializers.py +++ b/api/serializers.py @@ -1168,11 +1168,12 @@ class HostMacIpSerializer(serializers.ModelSerializer): hostname = serializers.CharField(source="domain.name", read_only=True) extension = serializers.CharField(source="domain.extension.name", read_only=True) mac_address = serializers.CharField(read_only=True) + ip_type = serializers.CharField(source="machine_type.ip_type", read_only=True) ipv4 = serializers.CharField(source="ipv4.ipv4", read_only=True) class Meta: model = machines.Interface - fields = ("hostname", "extension", "mac_address", "ipv4") + fields = ("hostname", "extension", "mac_address", "ipv4", "ip_type") # DNS