Commit 1f05f113 authored by Janez K's avatar Janez K
Browse files

deserialized value on inputs and outputs in api

parent 3c3f0511
......@@ -8,15 +8,27 @@ class ConnectionSerializer(serializers.HyperlinkedModelSerializer):
class InputSerializer(serializers.HyperlinkedModelSerializer):
deserialized_value = serializers.SerializerMethodField()
def get_deserialized_value(self,obj):
try:
return str(obj.value)
except:
return ""
class Meta:
model = Input
exclude = ('value',)
class OutputSerializer(serializers.HyperlinkedModelSerializer):
deserialized_value = serializers.SerializerMethodField()
def get_deserialized_value(self,obj):
try:
return str(obj.value)
except:
return ""
class Meta:
model = Output
exclude = ('value',)
class WidgetListSerializer(serializers.HyperlinkedModelSerializer):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment