Module: check_mk
Branch: master
Commit: e3fca1f776de1fce71929352078036f4a16634c1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e3fca1f776de1f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 24 11:31:51 2016 +0100
3345 FIX Fixed exception when inventory painter was used as group painter
---
.werks/3345 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/views.py | 3 ++-
web/plugins/views/inventory.py | 2 +-
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/3345 b/.werks/3345
new file mode 100644
index 0000000..dfb4eae
--- /dev/null
+++ b/.werks/3345
@@ -0,0 +1,10 @@
+Title: Fixed exception when inventory painter was used as group painter
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1458815496
+
+
diff --git a/ChangeLog b/ChangeLog
index c3a44a7..3403b05 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -137,6 +137,7 @@
* 3337 FIX: Improved error handling of invalid perfdata in the GUI
* 3339 FIX: Fixed exception on "Aggregations Affected by Service" page when
no host/service given
* 3344 FIX: Removed host inventory painters and sorters from non host based views
+ * 3345 FIX: Fixed exception when inventory painter was used as group painter
WATO:
* 3244 WATO BI Module: swap order of aggregation function and child node
selection...
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index d412f66..0bbfd5d 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -2380,7 +2380,8 @@ def group_value(row, group_painters):
group.append(groupvalfunc(row))
else:
for c in get_painter_columns(p[0]):
- group.append(row[c])
+ if c in row:
+ group.append(row[c])
return tuple(group)
def get_painter_option(name):
diff --git a/web/plugins/views/inventory.py b/web/plugins/views/inventory.py
index 2db86ee..b012d9d 100644
--- a/web/plugins/views/inventory.py
+++ b/web/plugins/views/inventory.py
@@ -27,7 +27,7 @@
import inventory
def paint_host_inventory(row, invpath):
- invdata = inventory.get(row["host_inventory"], invpath)
+ invdata = inventory.get(row.get("host_inventory"), invpath)
if not invdata:
return "", "" # _("No inventory data available")