Skip to content
Snippets Groups Projects
Commit 05721bb1 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-261: added task_type as read_only view for convenience

parent e0f153f5
No related branches found
No related tags found
1 merge request!409Resolve TMSS-261
......@@ -295,6 +295,7 @@ class TaskDraftSerializer(DynamicRelationalHyperlinkedModelSerializer):
relative_start_time = FloatDurationField(read_only=True)
relative_stop_time = FloatDurationField(read_only=True)
specifications_doc = JSONEditorField(schema_source='specifications_template.schema')
task_type = serializers.StringRelatedField(source='specifications_template.type', label='task_type', read_only=True, help_text='The task type as defined in the specifications template.')
class Meta:
model = models.TaskDraft
......@@ -313,6 +314,7 @@ class TaskBlueprintSerializer(DynamicRelationalHyperlinkedModelSerializer):
relative_start_time = FloatDurationField(read_only=True)
relative_stop_time = FloatDurationField(read_only=True)
specifications_doc = JSONEditorField(schema_source='specifications_template.schema')
task_type = serializers.StringRelatedField(source='specifications_template.type', label='task_type', read_only=True, help_text='The task type as defined in the specifications template.')
class Meta:
model = models.TaskBlueprint
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment