Werk #18374: Fix Alternative valuespec crash when switching between incompatible types
| Component | Setup | ||||
| Title | Fix Alternative valuespec crash when switching between incompatible types | ||||
| Date | Mar 4, 2026 | ||||
| Level | Trivial Change | ||||
| Class | Bug Fix | ||||
| Compatibility | Compatible - no manual interaction needed | ||||
| Checkmk versions & editions |
|
When switching between alternatives in a form (e.g. from an SNMPv3 tuple to an SNMPv2c string), the stored value may not match the newly selected alternative's expected type. Previously, this caused an AttributeError in most scenarios.
The fix now uses the alternative's default_value() when the stored value's type does not match the selected alternative, preventing the crash.