From 425b607e8c9acc306b63a573a502ef97e10bb71a Mon Sep 17 00:00:00 2001 From: Natan Keddem Date: Thu, 23 Nov 2023 22:16:03 -0500 Subject: [PATCH] cleanup --- bale/tabs/automation.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bale/tabs/automation.py b/bale/tabs/automation.py index 5916cdc..5628104 100644 --- a/bale/tabs/automation.py +++ b/bale/tabs/automation.py @@ -767,7 +767,6 @@ class Automation(Tab): self.scheduler.scheduler.remove_job(job.id) for host in hosts: auto_id = f"{auto_name}@{host}" - if self.previous_prop != "": command = AutomationTemplate(self.previous_prop) prop = command.safe_substitute(name=auto_name, host=host) @@ -810,8 +809,8 @@ class Automation(Tab): ) elif self.app.value == "remote": for job in jobs: - j = job.id.split("@")[0] - if j == auto_name: + auto = automation(job) + if auto is not None and auto.name == auto_name: self.scheduler.scheduler.remove_job(job.id) for host in hosts: auto_id = f"{auto_name}@{host}"