Comment 4 for bug 319966

Revision history for this message
Sander van Schouwenburg (Sandworm) (sander-sinaasappel) wrote :

No, I have not changed this behavior, but I do believe the fix is quite simple now: just remove the call to AnewtFormControlChoice::_ensure_selection() in AnewtFormControlChoice::set_value(). This way an invalid option will result in no valid option being selected. AnewtFormControl::is_valid() will then set the error to 'Invalid value' and return false.

If you want the fallback behavior you'll have to call _ensure_selection() manually, so maybe the underscore should be removed and it should no longer be marked as private.