Module: check_mk
Branch: master
Commit: 1505d23a22721163b5093c67dc7993c26722075d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1505d23a227211…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 15 11:35:21 2016 +0100
#3060 FIX Folder properties: Fixed exception when a user has no alias set
The "Network Scan" property caused the page to break when at least one
user had no alias set.
---
.werks/3060 | 11 +++++++++++
ChangeLog | 3 +++
web/plugins/wato/builtin_attributes.py | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/3060 b/.werks/3060
new file mode 100644
index 0000000..9ea1ab5
--- /dev/null
+++ b/.werks/3060
@@ -0,0 +1,11 @@
+Title: Folder properties: Fixed exception when a user has no alias set
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1455532388
+
+The "Network Scan" property caused the page to break when at least one
+user had no alias set.
diff --git a/ChangeLog b/ChangeLog
index d6ea0c8..3b3101e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,9 @@
Multisite:
* 3059 FIX: Fixed highlighting of availability timeline time slices
+ WATO:
+ * 3060 FIX: Folder properties: Fixed exception when a user has no alias set...
+
Event Console:
* 3058 FIX: Event Console is now allowing non loadable MIB modules on startup...
diff --git a/web/plugins/wato/builtin_attributes.py
b/web/plugins/wato/builtin_attributes.py
index 95ca223..7c62661 100644
--- a/web/plugins/wato/builtin_attributes.py
+++ b/web/plugins/wato/builtin_attributes.py
@@ -141,7 +141,7 @@ register_hook('validate-host', validate_host_parents)
class NetworkScanAttribute(ValueSpecAttribute):
def __init__(self):
def get_all_user_ids():
- return [ (user_id, "%s (%s)" % (user_id, user["alias"]))
+ return [ (user_id, "%s (%s)" % (user_id,
user.get("alias", user_id)))
for user_id, user in userdb.load_users(lock = False).items() ]
ValueSpecAttribute.__init__(self, "network_scan",