Module: check_mk
Branch: master
Commit: 3c5bade4b194e41facfe317affd1469a8de5e885
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3c5bade4b194e4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon May 2 08:53:52 2016 +0200
3451 FIX Fixed exception in host list when no local site configured
---
.werks/3451 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/watolib.py | 5 ++++-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/3451 b/.werks/3451
new file mode 100644
index 0000000..811157d
--- /dev/null
+++ b/.werks/3451
@@ -0,0 +1,10 @@
+Title: Fixed exception in host list when no local site configured
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1462172016
+
+
diff --git a/ChangeLog b/ChangeLog
index ca39c73..7b5380d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -329,6 +329,7 @@
* 3382 FIX: Fixed exception when moving multiple folder levels to another folder
* 3383 FIX: Host search: Don't preselect any optional field (Searched for empty values)
* 3450 FIX: Site properties: It was not possible to switch a site back to "local site" connection
+ * 3451 FIX: Fixed exception in host list when no local site configured
Notifications:
* 3263 Notifications: allow users to restrict by their contact groups...
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 67a6c33..690d4da 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -3431,7 +3431,10 @@ class SiteAttribute(Attribute):
return html.var(varprefix + "site")
def get_tag_list(self, value):
- return [ "site:" + value ]
+ if value != None:
+ return [ "site:" + value ]
+ else:
+ return []
# The replication status contains information about each
# site. It is a dictionary from the site id to a dict with