Module: check_mk
Branch: master
Commit: be983a20c73b1491b66c38738e16af5fcc2a66a6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=be983a20c73b14…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue May 3 16:15:45 2011 +0200
Multisite: fix two bugs in view editor
---
web/htdocs/views.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 3794ad7..da50f88 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -453,6 +453,8 @@ def page_edit_view(h):
view["title"] += " (Copy)"
else:
view = html.multisite_views.get((html.req.user, viewname))
+ if not view:
+ view = html.multisite_views.get(('', viewname)) # load builtin
view
datasourcename = view["datasource"]
if view:
@@ -928,9 +930,9 @@ def create_view():
if is_joined_value(joined_cols, "col_%d" % n) and not join_index:
raise MKUserError('col_join_index_%d' % n, "Please specify
the service to show the data for")
- if join_index != '' and col_title != '':
+ if join_index and col_title:
painternames.append((pname, viewname, tooltip, join_index, col_title))
- elif join_index != '':
+ elif join_index:
painternames.append((pname, viewname, tooltip, join_index))
else:
painternames.append((pname, viewname, tooltip))