Module: check_mk
Branch: master
Commit: 0823edfd59a5a2d692db1aa6e7758c7d757983e7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0823edfd59a5a2…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Sep 3 15:46:20 2015 +0200
#2560 FIX Fixed rare exception when using bulk host move
When using bulk move of hosts in WATO, this exception could oocur:
Traceback (most recent call last):
File "/omd/sites/xxx/share/check_mk/web/htdocs/index.py", line 261, in
handler
handler()
File "/omd/sites/xxx/share/check_mk/web/htdocs/wato.py", line 240, in
page_handler
result = modefunc("action")
File "/omd/sites/xxx/share/check_mk/web/htdocs/wato.py", line 948, in
mode_folder
target_folder = g_folders[target_folder_name]
KeyError: None
---
.werks/2560 | 20 ++++++++++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 2 +-
3 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/.werks/2560 b/.werks/2560
new file mode 100644
index 0000000..0f70d2b
--- /dev/null
+++ b/.werks/2560
@@ -0,0 +1,20 @@
+Title: Fixed rare exception when using bulk host move
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1441287879
+
+When using bulk move of hosts in WATO, this exception could oocur:
+
+Traceback (most recent call last):
+ File "/omd/sites/xxx/share/check_mk/web/htdocs/index.py", line 261, in
handler
+ handler()
+ File "/omd/sites/xxx/share/check_mk/web/htdocs/wato.py", line 240, in
page_handler
+ result = modefunc("action")
+ File "/omd/sites/xxx/share/check_mk/web/htdocs/wato.py", line 948, in
mode_folder
+ target_folder = g_folders[target_folder_name]
+KeyError: None
+
diff --git a/ChangeLog b/ChangeLog
index 4296d38..9126678 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -234,6 +234,7 @@
* 2539 FIX: Fix impossibility of removing a status host from an existing site
configuration
* 2550 FIX: Catching exception when having name conflicts while moving a folder
* 2552 FIX: API: Service Discovery action is now creating missing pending log entry
and marks the site dirty
+ * 2560 FIX: Fixed rare exception when using bulk host move...
Notifications:
* 2478 Integrated notification plugin for mobile phone push messages via Pushover...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 0bad9b7..e2f11ea 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -955,7 +955,7 @@ def mode_folder(phase):
elif html.var("_bulk_move"):
config.need_permission("wato.edit_hosts")
config.need_permission("wato.move_hosts")
- target_folder_name = html.var("bulk_moveto")
+ target_folder_name = html.var("bulk_moveto",
html.var("_top_bulk_moveto"))
if target_folder_name == "@":
raise MKUserError("bulk_moveto", _("Please select the
destination folder"))
target_folder = g_folders[target_folder_name]