SIGN IN SIGN UP

fix(cli): register module preferences before set-prefs validation (#10105)

PR #10047 made `Preferences.save_cli()` validate against the registered
preference object, but `setup.py set-prefs` only enters `app_context()`
and never calls `run_before_app_start()`, leaving `Preferences.modules`
empty. Every CLI write then fell into the "Module 'X' is no longer in
use." path and was reported as "Invalid value provided".

Trigger registration explicitly (run_before_app_start enters both
app and test_request contexts internally, satisfying registration
callbacks that touch current_user) and propagate the typed error
message from save_cli so users see the actual reason a value was
rejected.
A
Ashesh Vashi committed
660ecf21139197cb1f5add4276a7084ca3955d51
Parent: 71c18fb
Committed by GitHub <noreply@github.com> on 6/17/2026, 9:19:53 AM