1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

always specify cloud: True/False for JT/job credential summary

This commit is contained in:
Ryan Petrello 2018-06-21 11:15:38 -04:00
parent c944f37637
commit 813a3be2b8
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777

View File

@ -3059,7 +3059,8 @@ class JobTemplateSerializer(JobTemplateMixin, UnifiedJobTemplateSerializer, JobO
'id': cred.pk,
'name': cred.name,
'description': cred.description,
'kind': cred.kind
'kind': cred.kind,
'cloud': cred.credential_type.kind == 'cloud'
}
if self.version > 1:
summarized_cred['credential_type_id'] = cred.credential_type_id
@ -3195,7 +3196,8 @@ class JobSerializer(UnifiedJobSerializer, JobOptionsSerializer):
'id': cred.pk,
'name': cred.name,
'description': cred.description,
'kind': cred.kind
'kind': cred.kind,
'cloud': cred.credential_type.kind == 'cloud'
}
if self.version > 1:
summarized_cred['credential_type_id'] = cred.credential_type_id