Module: check_mk
Branch: master
Commit: 91517b670875dc3de7d9598ebcd4443c6754adb1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=91517b670875dc…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jan 14 14:46:43 2016 +0100
WATO: fix exception on folder move combo in some cases
---
web/htdocs/watolib.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 1c33f8d..e914974 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -653,6 +653,7 @@ class Folder(BaseFolder):
self._name = name
self._parent = parent_folder
self._subfolders = {}
+ self._choices_for_moving_host = None
if folder_path != None:
self._init_by_loading_existing_directory(folder_path)
else:
@@ -1108,10 +1109,9 @@ class Folder(BaseFolder):
def choices_for_moving_host(self):
- # Cached?
- try:
- return self._choices_for_moving_host
- except:
+ if self._choices_for_moving_host != None:
+ return self._choices_for_moving_host # Cached
+ else:
self._choices_for_moving_host = self._choices_for_moving("host")
return self._choices_for_moving_host