fix: prevent config dialog known-path/boolean data loss#1291
Open
crowecawcaw wants to merge 5 commits into
Open
fix: prevent config dialog known-path/boolean data loss#1291crowecawcaw wants to merge 5 commits into
crowecawcaw wants to merge 5 commits into
Conversation
Editing a known-asset path to a value that already exists in the list would unconditionally stage the rebuilt path list (which excludes the row being edited) even though the re-insert was skipped as a duplicate. This silently dropped the original row from the config = data loss. Guard the write/refresh on the re-insert actually happening. Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>
A corrupt/garbage stored boolean setting was blindly coerced to False in the checkbox refresh, ignoring the setting's declared default. For settings whose default is 'true' (e.g. submitter_update_notification) this silently flipped the value off. Fall back to str2bool(get_setting_default(...)) instead. Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>
crowecawcaw
marked this pull request as ready for review
July 22, 2026 20:21
Restores the mock_api fixture's get_setting side_effect after the test instead of leaving the corrupt-value stub in place, fixing the mypy attribute error on the MagicMock reassignment. Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>
crowecawcaw
force-pushed
the
review-fix/config-dialog-dataloss
branch
from
July 22, 2026 21:39
5ee0080 to
abe1ce0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes:
What was the problem/requirement? (What/Why)
Two bugs in the config dialog (
ui/dialogs/deadline_config_dialog.py):Falseinstead of falling back to the setting's declared default.What was the solution? (How)
if path not in current_paths:guard so the original row is only removed when the re-insert actually happens.str2boolValueError, fall back tostr2bool(get_setting_default(...))rather thanFalse.What is the impact of this change?
Editing a known-asset path to a duplicate no longer drops the original row, and a corrupt boolean setting uses its intended default.
How was this change tested?
Added red-green tests: editing to a duplicate keeps the original row (plus a control that a normal edit still stages), and a corrupt boolean falls back to the setting default.
test_settings_dialogue.py+test_deadline_config_dialog.py(18 passed).Was this change documented?
Does this PR introduce new dependencies?
Is this a breaking change?
No.
Does this change impact security?
No.