Skip to content

Commit

Permalink
Add related link for JT.organization
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCoding committed Jul 22, 2019
1 parent c5de6c6 commit b2c3ecf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions awx/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2719,6 +2719,8 @@ def get_related(self, obj):
res['project'] = self.reverse('api:project_detail', kwargs={'pk': obj.project.pk})
except ObjectDoesNotExist:
setattr(obj, 'project', None)
if obj.organization_id:
res['organization'] = self.reverse('api:organization_detail', kwargs={'pk': obj.organization_id})
if isinstance(obj, UnifiedJobTemplate):
res['extra_credentials'] = self.reverse(
'api:job_template_extra_credentials_list',
Expand Down

0 comments on commit b2c3ecf

Please sign in to comment.