From f5d1412635c7e7e343d1d127b496a9e3b98b85a2 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Mon, 3 Feb 2020 15:38:48 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20:=20la=20variable=20type=20a=20cha?= =?UTF-8?q?ng=C3=A9=20de=20nom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- machines/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machines/serializers.py b/machines/serializers.py index a6c523ab..95e0df5c 100644 --- a/machines/serializers.py +++ b/machines/serializers.py @@ -48,7 +48,7 @@ class IpTypeField(serializers.RelatedField): """ Serializer for an IpType object field """ def to_representation(self, value): - return value.type + return str(value) def to_internal_value(self, data): pass @@ -164,7 +164,7 @@ class TypeSerializer(serializers.ModelSerializer): class Meta: model = IpType fields = ( - "type", + "name", "extension", "domaine_ip_start", "domaine_ip_stop",