From 7e08638f50868b1a1677e10c6797325744e03af7 Mon Sep 17 00:00:00 2001 From: D Stephenson Date: Wed, 13 May 2026 18:07:43 +0000 Subject: [PATCH] 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 --- scanner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scanner.py b/scanner.py index ef37f8d..589533a 100644 --- a/scanner.py +++ b/scanner.py @@ -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