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

don't show summary_fields.credential.credential_type_id on /api/v1/

This commit is contained in:
Ryan Petrello 2018-06-21 09:19:47 -04:00
parent 78f6907c1b
commit 83ecea2377
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777

View File

@ -1964,8 +1964,10 @@ class InventorySourceOptionsSerializer(BaseSerializer):
if cred:
summary_fields['credential'] = {
'id': cred.id, 'name': cred.name, 'description': cred.description,
'kind': cred.kind, 'cloud': True, 'credential_type_id': cred.credential_type_id
'kind': cred.kind, 'cloud': True
}
if self.version > 1:
summary_fields['credential']['credential_type_id'] = cred.credential_type_id
else:
summary_fields.pop('credential')
return summary_fields