check if template key exists

This commit is contained in:
Alex Cater 2022-10-23 22:09:04 -08:00 committed by GitHub
parent 9518f65c05
commit 26c6ca6bc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -190,7 +190,7 @@ def getvms():
vms = []
try:
for vm in G.proxmox.cluster.resources.get(type='vm'):
if vm['template']:
if 'template' in vm and vm['template']:
continue
if G.guest_type == 'both':
vms.append(vm)