Add organization to wfjt serializer related_fields.

This commit is contained in:
Aaron Tan 2016-11-17 17:11:58 -05:00
parent cf8f12c1f0
commit 87bf7d22e1

View File

@ -2218,6 +2218,8 @@ class WorkflowJobTemplateSerializer(LabelsListMixin, UnifiedJobTemplateSerialize
notification_templates_error = reverse('api:workflow_job_template_notification_templates_error_list', args=(obj.pk,)),
survey_spec = reverse('api:workflow_job_template_survey_spec', args=(obj.pk,)),
))
if obj.organization:
res['organization'] = reverse('api:organization_detail', args=(obj.organization.pk,))
return res
def validate_extra_vars(self, value):