diff --git a/cloud/cloudstack/cs_template.py b/cloud/cloudstack/cs_template.py index ed5472c2c3e..fbaa5665eb2 100644 --- a/cloud/cloudstack/cs_template.py +++ b/cloud/cloudstack/cs_template.py @@ -501,7 +501,7 @@ class AnsibleCloudStackTemplate(AnsibleCloudStack): return templates['template'][0] else: for i in templates['template']: - if i['checksum'] == checksum: + if 'checksum' in i and i['checksum'] == checksum: return i return None