Add a sublist api view for the UJTs that use a given execution environment

This commit is contained in:
Jeff Bradberry
2020-07-08 14:43:14 -04:00
committed by Shane McDonald
parent f9741b619c
commit 45a0084f78
3 changed files with 12 additions and 1 deletions
+2 -1
View File
@@ -1368,7 +1368,8 @@ class ExecutionEnvironmentSerializer(BaseSerializer):
def get_related(self, obj):
res = super(ExecutionEnvironmentSerializer, self).get_related(obj)
res.update(
activity_stream = self.reverse('api:execution_environment_activity_stream_list', kwargs={'pk': obj.pk}),
activity_stream=self.reverse('api:execution_environment_activity_stream_list', kwargs={'pk': obj.pk}),
unified_job_templates=self.reverse('api:execution_environment_job_template_list', kwargs={'pk': obj.pk}),
)
if obj.organization:
res['organization'] = self.reverse('api:organization_detail', kwargs={'pk': obj.organization.pk})