From 98d2ca5b16e8a3c1ce0e06fe9c2f9c9f37bbc818 Mon Sep 17 00:00:00 2001 From: Jim Ladd Date: Mon, 31 Jul 2017 11:41:14 -0400 Subject: [PATCH] Vault credential should have ssh type for v1 job templates (#119) --- awx/api/serializers.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index cc19e3fbf7..b6f6e86230 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -2434,6 +2434,12 @@ class JobTemplateMixin(object): if obj.survey_spec is not None and ('name' in obj.survey_spec and 'description' in obj.survey_spec): d['survey'] = dict(title=obj.survey_spec['name'], description=obj.survey_spec['description']) d['recent_jobs'] = self._recent_jobs(obj) + + # TODO: remove in 3.3 + if self.version == 1 and 'vault_credential' in d: + if d['vault_credential'].get('kind','') == 'vault': + d['vault_credential']['kind'] = 'ssh' + return d