Files
TimeTracker/tests
Dries Peeters c46c2d9721 fix: prevent redirect to /setup when changing settings (fixes #436)
When changing Admin settings or toggling telemetry, users could be
redirected to the Welcome screen (/setup) because installation.json
was sometimes overwritten without setup_complete, and
get_telemetry_preference() could poison the in-memory config with a
bad load.

- _save_config(): merge with on-disk state before write so existing
  keys (e.g. setup_complete) are never dropped.
- get_telemetry_preference(): use a local load only; do not overwrite
  self._config to avoid poisoning the shared state when the file is
  corrupt or empty.

Add tests to ensure set_telemetry_preference does not remove
setup_complete and that a bad get_telemetry_preference load does not
lead to setup_complete being wiped on the next set_telemetry_preference.
2026-01-20 19:58:34 +01:00
..