From ef797e9a1a7433d65835f331b1e90a8d2aeed2f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 9 Jul 2024 03:11:33 +0200 Subject: [PATCH] Fix removing VM from obsolete_vms The domain-delete event gets string as a 'vm' argument, so use it directly instead of accessing its 'name' attribute. Fixes: 25f1be1 "Remove VM from obsolete_vms list if template is deleted" (cherry picked from commit f11af35126fd5e89e4b7dd79ac5c3d4dbe01039d) --- qui/tray/updates.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qui/tray/updates.py b/qui/tray/updates.py index 736ba441..65aa268d 100644 --- a/qui/tray/updates.py +++ b/qui/tray/updates.py @@ -170,8 +170,8 @@ def domain_removed(self, _submitter, _event, vm, *_args, **_kwargs): if vm in self.vms_needing_update: self.vms_needing_update.remove(vm) self.update_indicator_state() - if vm.name in self.obsolete_vms: - self.obsolete_vms.remove(vm.name) + if vm in self.obsolete_vms: + self.obsolete_vms.remove(vm) self.update_indicator_state() def feature_unset(self, vm, event, feature, **_kwargs):