From b189371a7b6050fb9854b4f6bbfb507d5073ee8f Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 11 May 2019 02:38:16 +0200 Subject: [PATCH] Call get_all_active_vmids to get the active vmids --- hosting/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/views.py b/hosting/views.py index f1a6dd9c..5a3e06b2 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -464,7 +464,7 @@ class SSHKeyDeleteView(LoginRequiredMixin, DeleteView): keys = UserHostingKey.objects.filter(user=self.request.user) keys_to_save = [k.public_key for k in keys if k != public_key] manager.save_key_in_opennebula_user('\n'.join(keys_to_save)) - vm_ids = manager.get_vms() + vm_ids = manager.get_all_active_vmids() if len(vm_ids) > 0 and len(keys_to_save) > 0: for vm_id in vm_ids: manager.save_key_in_vm_template(vm_id, '\n'.join(keys_to_save))