Merge pull request #8353 from jbradberry/zedr-wfjt-inventories

Zedr wfjt inventories

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot]
2020-10-12 15:55:01 +00:00
committed by GitHub
2 changed files with 20 additions and 3 deletions

View File

@@ -3438,6 +3438,12 @@ class WorkflowJobTemplateSerializer(JobTemplateMixin, LabelsListMixin, UnifiedJo
res['organization'] = self.reverse('api:organization_detail', kwargs={'pk': obj.organization.pk})
if obj.webhook_credential_id:
res['webhook_credential'] = self.reverse('api:credential_detail', kwargs={'pk': obj.webhook_credential_id})
if obj.inventory_id:
res['inventory'] = self.reverse(
'api:inventory_detail', kwargs={
'pk': obj.inventory_id
}
)
return res
def validate_extra_vars(self, value):