Werk #15491: Fix possible crash on editing pagetypes

Component User interface
Title Fix possible crash on editing pagetypes
Date May 9, 2023
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.3.0b1
Not yet released
Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.3.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.2.0b8 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

If you edited pagetypes like topics, custom graphs, etc. and tried to save an unallowed value, e.g. float instead of integer for "Sort order", the error "UnboundLocalError: cannot access local variable 'new_page_dict' where it is not associated with a value" occurred.

You will now get a message which value is wrong to correct it before saving the pagetype.

To the list of all Werks