1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Merge pull request #2269 from ryanpetrello/no-inventory-credentials-v1

always specify `cloud: True/False` for JT/job credential summary
This commit is contained in:
Ryan Petrello 2018-06-21 12:07:10 -04:00 committed by GitHub
commit 008a3a0d01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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