Preserve links from other depts during filtered scans

clear_links() now only runs on full scans (dept=None). Dept-filtered
scans upsert without wiping, so GW links survive a Scan ELEC run
and vice versa.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-13 18:07:43 +00:00
parent 75d4eeb062
commit 7e08638f50
+2 -1
View File
@@ -62,7 +62,8 @@ def run_scan(dept: str = None, workers: int = 5, login_delay: int = 3):
})
scan_id = log_scan_start()
clear_links() # Fresh start for links each scan
if dept is None:
clear_links() # Full scan only — dept scans upsert without wiping other depts
def on_progress(done, total, ip, result):
from datetime import datetime