Module: check_mk
Branch: master
Commit: 6c43c77c691ebeaa024a4e29ce5f2362ff6d606d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6c43c77c691ebe…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Apr 25 12:14:23 2012 +0200
FIX: Fixed exception caused by validation problems during editing tags in WATO
---
ChangeLog | 3 ++-
web/htdocs/valuespec.py | 13 ++-----------
web/htdocs/wato.py | 7 +++----
3 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dafbcdc..310c645 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,7 +19,8 @@
* Reimplemented folder listing in host/folders module
* Redesigned the breadcrumb navigation
* FIX: fix page header after confirmation dialogs
- * FIX: fixed umlaut problem in host aliases and ip addresses created by WATO
+ * FIX: Fixed umlaut problem in host aliases and ip addresses created by WATO
+ * FIX: Fixed exception caused by validation problems during editing tags in WATO
1.2.0b2:
Core:
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index ca8fd11..8607b14 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -593,11 +593,6 @@ class ListOf(ValueSpec):
# Actual table of currently existing entries
html.write('<table class="valuespec_listof"
id="%s_table">' % varprefix)
- if html.has_var(varprefix + "_count"): # already filled in, complain
- value = [None] * int(html.var(varprefix + "_count"))
- # the underlying render_input-functions should ignore the
- # value in this case themselves, so that the "None" should not
- # harm here.
for nr, v in enumerate(value):
html.push_transformation(lambda x: x.replace(self._magic, str(nr+1)))
@@ -1384,12 +1379,8 @@ class Tuple(ValueSpec):
if not self._vertical:
html.write("<tr>")
- # If the form is already filled in and we are in complain mode,
- # the value in value must be ignored
- if html.form_filled_in():
- value = (None,) * len(self._elements)
-
- for no, (element, val) in enumerate(zip(self._elements, value)):
+ for no, element in enumerate(self._elements):
+ val = value[no]
vp = varprefix + "_" + str(no)
if element.help():
help = "<br><i>%s</i>" % element.help()
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 936b071..57ad9e0 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8031,10 +8031,9 @@ def mode_edit_hosttag(phase):
return
hosttags, auxtags = load_hosttags()
- if new:
- title = ""
- choices = []
- else:
+ title = ""
+ choices = []
+ if not new:
for id, tit, ch in hosttags:
if id == tag_id:
title = tit