Commit b223ecb2 authored by root's avatar root
Browse files

Merge branch 'master' of https://github.com/tribe29/checkmk

parents 733150a3 970c0dc3
Title: Fix error on using folder in rule search
Class: fix
Compatible: compat
Component: wato
Date: 1653381047
Edition: cre
Knowledge: doc
Level: 1
State: unknown
Version: 2.2.0i1
If the option "Folder" was used in the rule search, submitting the search
button lead to the error "The selected element 'None' is not longer available.
Please select something else.".
......@@ -412,6 +412,10 @@ def _is_var_to_delete(form_prefix: str, varname: str, value: str) -> bool:
and tags with an own tagvalue variable, if not 'ignored':
'search_p_rule_hosttags_tag_address_family' : 'ignore'/'is'/'is not'
'search_p_rule_hosttags_tagvalue_address_family' : 'ip-v4-only'
We also keep folder:
'search_p_rule_folder_USE' : 'on'
'search_p_rule_folder_1' : '60a33e6cf5151f2d52eddae9685cfa270426aa89d8dbc7dfb854606f1d1a40fe'
"""
if "_auxtag_" in varname and value != "ignore":
return False
......@@ -430,6 +434,9 @@ def _is_var_to_delete(form_prefix: str, varname: str, value: str) -> bool:
if tag_value and tag_value != "ignore":
return False
if "_folder_" in varname:
return False
return True
......
......@@ -64,6 +64,7 @@ from cmk.gui.wato.pages.rulesets import _is_var_to_delete
"search_p_rule_ineffective",
"3cbc87c7681f34db4617feaa2c8801931bc5e42d8d0f560e756dd4cd92885f18",
),
("search_p_rule_folder_USE", "ON"),
(
"search_p_rule_folder_0",
"6f49cdbd80e1b95d5e6427e1501fc217790daee87055fa5b4e71064288bddede",
......@@ -103,8 +104,6 @@ from cmk.gui.wato.pages.rulesets import _is_var_to_delete
"search_p_rule_hosttags_tagvalue_networking",
"search_p_rule_disabled",
"search_p_rule_ineffective",
"search_p_rule_folder_0",
"search_p_rule_folder_1",
],
id="search_with_default_settings",
),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment