From 1e7d61436657d06814f733c36dd45946df6edff6 Mon Sep 17 00:00:00 2001 From: Jochen Klar Date: Thu, 29 Aug 2019 16:32:09 +0200 Subject: [PATCH] Fix Attribute creation --- rdmo/domain/serializers/v1.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rdmo/domain/serializers/v1.py b/rdmo/domain/serializers/v1.py index 0a281ca1fe..e412c96e82 100644 --- a/rdmo/domain/serializers/v1.py +++ b/rdmo/domain/serializers/v1.py @@ -10,7 +10,8 @@ class AttributeSerializer(serializers.ModelSerializer): key = serializers.CharField(required=True) - parent = serializers.PrimaryKeyRelatedField(queryset=Attribute.objects.all(), default=None) + parent = serializers.PrimaryKeyRelatedField(queryset=Attribute.objects.all(), default=None, allow_null=True) + path = serializers.CharField(required=False) class Meta: model = Attribute