8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 07:23:46 +00:00

Merge branch 'fix_dhcp_api_serializer' into 'dev'

Add ip_type in dhcp api serializer

See merge request federez/re2o!486
This commit is contained in:
Jean-Romain Garnier 2020-02-15 14:51:43 +01:00
commit 0057832192

View file

@ -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