From 87bf7d22e115cd20f59415f4a820c1d7ddd6e1e7 Mon Sep 17 00:00:00 2001 From: Aaron Tan Date: Thu, 17 Nov 2016 17:11:58 -0500 Subject: [PATCH] Add organization to wfjt serializer related_fields. --- awx/api/serializers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index 4fea827ec0..f7201eb64a 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -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):