Module: check_mk
Branch: master
Commit: 7de92fdc9c2840c581517d72d149ecbd9e6b91fc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7de92fdc9c2840…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 26 13:03:08 2018 +0100
5658 FIX Fixed possible "TypeError" on "Agent update status" view
The exception "TypeError: expected string or buffer" could occur
when using the service grouping feature (Global settings > Grouping of services in
table views).
Change-Id: I9c9df19a548881faf4db4f48b4ef01d0fbe68e59
---
.werks/5658 | 12 ++++++++++++
web/plugins/views/layouts.py | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/5658 b/.werks/5658
new file mode 100644
index 0000000..747990d
--- /dev/null
+++ b/.werks/5658
@@ -0,0 +1,12 @@
+Title: Fixed possible "TypeError" on "Agent update status" view
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cee
+State: unknown
+Version: 1.5.0i3
+Date: 1516968100
+
+The exception "TypeError: expected string or buffer" could occur
+when using the service grouping feature (Global settings > Grouping of services in
table views).
diff --git a/web/plugins/views/layouts.py b/web/plugins/views/layouts.py
index d0824aa..cad67f9 100644
--- a/web/plugins/views/layouts.py
+++ b/web/plugins/views/layouts.py
@@ -336,7 +336,7 @@ def calculate_grouping_of_services(rows):
def try_to_match_group(row):
for group_spec in config.service_view_grouping:
- if row.get('service_description', '') != '' \
+ if row.get('service_description') \
and re.match(group_spec["pattern"],
row["service_description"]):
return group_spec