editing aggregations
Message-ID: <5ad5a4f2.KnUL0CTZh7bTknaQ%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: b6b2f163cd87873d20e85ccf18b5a7537f92de4a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b6b2f163cd8787…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Apr 16 16:28:03 2018 +0200
Improved error handling of invalid parameters when deleting / editing aggregations
Change-Id: I4b3a12c67233c132d33add533709b76f5982205c
---
web/plugins/wato/bi.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/web/plugins/wato/bi.py b/web/plugins/wato/bi.py
index b68ed01..da9ef51 100644
--- a/web/plugins/wato/bi.py
+++ b/web/plugins/wato/bi.py
@@ -1147,7 +1147,7 @@ class ModeBIAggregations(ModeBI):
def _delete_after_confirm(self):
- aggregation_id = int(html.var("_del_aggr"))
+ aggregation_id = html.get_integer_input("_del_aggr")
c = wato_confirm(_("Confirm aggregation deletion"),
_("Do you really want to delete the aggregation number
<b>%s</b>?") % (aggregation_id+1))
if c:
@@ -1564,7 +1564,7 @@ class ModeBIRuleTree(ModeBI):
class ModeBIEditAggregation(ModeBI):
def __init__(self):
ModeBI.__init__(self)
- self._edited_nr = int(html.var("id", "-1")) # In case of
Aggregations: index in list
+ self._edited_nr = html.get_integer_input("id", -1) # In case of
Aggregations: index in list
if self._edited_nr == -1:
self._new = True
self._edited_aggregation = {"groups" : [[_("Main")]]}