8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 11:23:10 +00:00

Add ip_type in dhcp api serializer

This commit is contained in:
chapeau 2020-02-04 10:54:17 +00:00 committed by root
parent 706b309a2a
commit 5975bb905e

View file

@ -1168,11 +1168,12 @@ class HostMacIpSerializer(serializers.ModelSerializer):
hostname = serializers.CharField(source="domain.name", read_only=True) hostname = serializers.CharField(source="domain.name", read_only=True)
extension = serializers.CharField(source="domain.extension.name", read_only=True) extension = serializers.CharField(source="domain.extension.name", read_only=True)
mac_address = serializers.CharField(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) ipv4 = serializers.CharField(source="ipv4.ipv4", read_only=True)
class Meta: class Meta:
model = machines.Interface model = machines.Interface
fields = ("hostname", "extension", "mac_address", "ipv4") fields = ("hostname", "extension", "mac_address", "ipv4", "ip_type")
# DNS # DNS