Module: check_mk
Branch: master
Commit: 7e66e16d348fe411db1a07a31ff331a10b4f6c17
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7e66e16d348fe4…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Jan 24 20:15:39 2012 +0100
WATO: fixed bug in host validation. crashed on creating a new
host when a validate-host hook was registered
---
web/htdocs/wato.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 0bb819f..2c06b50 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1745,11 +1745,13 @@ def mode_edithost(phase, new):
return go_to_services and "inventory" or "folder"
else:
+ # Show outcome of host validation. Do not validate new hosts
+ errors = None
if new:
render_folder_path()
+ else:
+ errors = validate_host(host)
- # Show outcome of host validation
- errors = validate_host(host)
if errors:
html.write("<div class=info>")
html.write('<table class=validationerror border=0 cellspacing=0
cellpadding=0><tr><td class=img>')