From 79e589b525187bd511578215c6af9bff4a6ebd71 Mon Sep 17 00:00:00 2001 From: StyxX65 <150797939+StyxX65@users.noreply.github.com> Date: Thu, 4 Jun 2026 14:47:01 +0200 Subject: [PATCH] Bugfix in Scheduler --- CLAUDE.md | 1 + scan_scheduler.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 8ce5cf2..c209383 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -217,6 +217,7 @@ Allows reviewing results from any past scan session without running a new scan. - **`scheduler_started` / `scheduler_done` SSE events** — broadcast at start and end of every job (including report-only). `scheduler_done` carries `flagged`, `scanned`, `emailed`, and `job_name`. Do not confuse with `scan_done` (M365) — they are separate event types. - **UI — job card badge** — `schedRenderJobs()` in `scheduler.js` adds a blue "Report only" (`m365_sched_report_only`) badge to the job name when `j.report_only` is true. - **UI — `schedToggleReportOnly()`** — dims the Profile row (`#schedProfileRow` opacity 0.4), shows/hides `#schedReportOnlyHint`, and forces `#schedAutoEmail` checked. Called from the checkbox `onchange` handler and at the start of `schedAddJob()` / `schedEditJob()`. +- **Profile options merge into file sources** — saved file-source dicts (`~/.gdprscanner/file_sources.json`) only carry connection info (`id, label, path, smb_host, smb_user, smb_domain, keychain_key, sftp_*`). Per-scan options live on the profile (`options.cpr_only`, `options.ocr_lang`, `options.scan_photos`, `options.skip_gps_images`, `options.min_cpr_count`, `options.scan_emails`, `options.scan_phones`, `options.max_file_mb`). The scheduler unpacks them with `{**fs, **_fs_extra}` before calling `_m.run_file_scan(fs)` — mirroring what `startScan()` in `scan.js` does in the browser. Do not pass `fs` directly to `run_file_scan()` without merging — the file scan reads these keys with `source.get(...)` and will silently fall back to defaults, ignoring the profile's settings. ## Claude NER — document_scanner.py + app_config.py + routes/app_routes.py diff --git a/scan_scheduler.py b/scan_scheduler.py index df1ec03..0483bfe 100644 --- a/scan_scheduler.py +++ b/scan_scheduler.py @@ -473,7 +473,7 @@ class ScanScheduler: logger.info("[scheduler] Profile '%s': sources=%s, users=%d", p.get("name", pid), opts["sources"], len(opts.get("user_ids", []))) _m.broadcast("scheduler_debug", { - "msg": f"Using profile '{p.get('name',pid)}': sources={opts['sources']}, users={len(opts.get("user_ids",[]))}"}) + "msg": f"Using profile '{p.get('name',pid)}': sources={opts['sources']}, users={len(opts.get('user_ids',[]))}"}) return opts logger.info("[scheduler] Profile '%s' not found — using saved settings", pid) _m.broadcast("scheduler_debug", {"msg": f"Profile id '{pid}' not found — falling back to saved settings"})