[checkmk-commits] 6850 FIX Fixed broken ruleset search reset function

Lars Michelsen lm at mathias-kettner.de
Wed Nov 7 09:21:28 CET 2018


Module: check_mk
Branch: master
Commit: 5e98c1a01cfde3bb4c903a3faba7d1546938887c
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5e98c1a01cfde3bb4c903a3faba7d1546938887c

Author: Lars Michelsen <lm at mathias-kettner.de>
Date:   Wed Nov  7 09:18:33 2018 +0100

6850 FIX Fixed broken ruleset search reset function

The reset functionality of the ruleset search was not working at all. It always
resulted in an exception like: "AttributeError: 'ModeRuleSearch' object has no attribute 'search_options'"

Change-Id: Ifb0fe965bd1003d5a411d77762b79026bcb6b97c

---

 .werks/6850                    | 12 ++++++++++++
 cmk/gui/wato/pages/rulesets.py |  3 ++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/.werks/6850 b/.werks/6850
new file mode 100644
index 0000000..a1373f5
--- /dev/null
+++ b/.werks/6850
@@ -0,0 +1,12 @@
+Title: Fixed broken ruleset search reset function
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1541518998
+
+The reset functionality of the ruleset search was not working at all. It always
+resulted in an exception like: "AttributeError: 'ModeRuleSearch' object has no attribute 'search_options'"
diff --git a/cmk/gui/wato/pages/rulesets.py b/cmk/gui/wato/pages/rulesets.py
index d4f0336..0ec2143 100644
--- a/cmk/gui/wato/pages/rulesets.py
+++ b/cmk/gui/wato/pages/rulesets.py
@@ -1057,7 +1057,8 @@ class ModeRuleSearch(WatoMode):
     def _from_vars(self):
         if html.var("_reset_search"):
             html.del_all_vars("search_")
-            return {}
+            self.search_options = {}
+            return
 
         value = self._valuespec().from_html_vars("search")
         self._valuespec().validate_value(value, "search")



More information about the checkmk-commits mailing list