Module: check_mk
Branch: master
Commit: e2f0ff96056565140e5fa952d95d534c5ee38935
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e2f0ff96056565…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Feb 3 14:30:05 2014 +0100
FIX Fixed exception when view title or description was missing
---
.werks/274 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/views.py | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/.werks/274 b/.werks/274
new file mode 100644
index 0000000..8bfe4fe
--- /dev/null
+++ b/.werks/274
@@ -0,0 +1,9 @@
+Title: Fixed exception when view title or description was missing
+Level: 1
+Component: multisite
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1391434136
+
+
diff --git a/ChangeLog b/ChangeLog
index 5e0ecc0..977a936 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -192,6 +192,7 @@
* 0676 FIX: Move view "Stale services" to Problems folder
* 0270 FIX: Multisite host tag filter: Now uses exact match...
* 0273 FIX: Fixed exceptions when modifying / cloning views...
+ * 0274 FIX: Fixed exception when view title or description was missing
WATO:
* 0308 Multisite can now set rotation view permissions for NagVis...
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 8085e88..f47dbfc 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -278,6 +278,11 @@ def load_views():
html.multisite_views[(user, name)] = view
+ # Repair views with missing 'title' or 'description'
+ for key in [ "title", "description" ]:
+ if key not in view:
+ view[key] = _("Missing %s") % key
+
except SyntaxError, e:
raise MKGeneralException(_("Cannot load views from %s/views.mk:
%s") % (dirpath, e))