Module: check_mk
Branch: master
Commit: ae6efd3bfe5ba685a33d21a525d258660b1e7170
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ae6efd3bfe5ba6…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Feb 3 13:00:02 2016 +0100
Fix duplicate load() in pagetype
---
web/htdocs/pagetypes.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/pagetypes.py b/web/htdocs/pagetypes.py
index 8f454e2..a9d8da1 100644
--- a/web/htdocs/pagetypes.py
+++ b/web/htdocs/pagetypes.py
@@ -322,6 +322,7 @@ class PageRenderer:
@classmethod
def page_show(self):
name = html.var(self.ident_attr())
+ self.load()
page = self.find_page(name)
if not page:
raise MKGeneralException(_("Cannot find %s with the name %s") % (
@@ -564,8 +565,6 @@ class Overridable:
# publishing und overriding by admins
@classmethod
def find_page(self, name):
- self.load()
-
mine = None
forced = None
builtin = None
@@ -614,6 +613,7 @@ class Overridable:
def builtin_pages(self):
return {}
+
# Lädt alle Dinge vom aktuellen User-Homeverzeichnis und
# mergt diese mit den übergebenen eingebauten
@classmethod
@@ -1030,6 +1030,7 @@ class Container:
self.need_overriding_permission("edit")
need_sidebar_reload = False
+ self.load()
page = self.find_page(page_name)
if not page.is_mine():
page = page.clone()