File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -268,8 +268,15 @@ async def _remove_automation(self) -> None:
268268 rows = await self ._grid .get_selected_rows ()
269269 for row in rows :
270270 for job in self .scheduler .scheduler .get_jobs ():
271- j = job .id .split ("@" )[0 ]
272- if j == row ["name" ]:
271+ auto = automation (job )
272+ if auto is not None and auto .name == row ["name" ]:
273+ if job .id in job_handlers :
274+ del job_handlers [job .id ]
275+ if isinstance (auto , scheduler .Zfs_Autobackup ):
276+ for host in auto .hosts :
277+ command = AutomationTemplate (auto .prop )
278+ prop = command .safe_substitute (name = auto .name , host = host )
279+ await self ._remove_prop_from_all_fs (host = host , prop = prop )
273280 self .scheduler .scheduler .remove_job (job .id )
274281 self ._automations .remove (row )
275282 self ._grid .update ()
You can’t perform that action at this time.
0 commit comments