From 1a8f654de944f059cc1336625bfe745e37d56f99 Mon Sep 17 00:00:00 2001 From: Roland Reich Date: Mon, 28 Sep 2026 15:49:34 +0200 Subject: [PATCH] bugfix sql-statement for deleting jobs --- app/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index 8671bb6..cbcfebd 100755 --- a/app/main.py +++ b/app/main.py @@ -450,12 +450,13 @@ def _run_remote_job_cleanup_maintenance() -> None: try: assets = ( db.query(Asset) - .join(SoftwareJob, SoftwareJob.asset_id == Asset.id) .filter( Asset.mesh_node_id.isnot(None), Asset.mesh_online.is_(True), + db.query(SoftwareJob.id) + .filter(SoftwareJob.asset_id == Asset.id) + .exists(), ) - .distinct() .order_by(Asset.id) .all() )