Module: check_mk
Branch: master
Commit: b1fd331ea93d7288d0b37db645d26d48683b3fb7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b1fd331ea93d72…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 20 15:28:43 2017 +0100
4388 FIX Views: Fixed exception with host tag columns which tag has been deleted
This fixes a possible exception "TypeError ('NoneType' object is
unsubscriptable)".
Change-Id: I2e1f273f42cfc7086ffb2d18c0ec88fd41e19883
---
.werks/4388 | 10 ++++++++++
web/htdocs/views.py | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/4388 b/.werks/4388
new file mode 100644
index 0000000..e1e1216
--- /dev/null
+++ b/.werks/4388
@@ -0,0 +1,10 @@
+Title: Views: Fixed exception with host tag columns which tag has been deleted
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.5.0i1
+Date: 1487600861
+
+This fixes a possible exception "TypeError ('NoneType' object is
unsubscriptable)".
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 73f82a9..99b2686 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -2880,7 +2880,7 @@ def get_tag_group(tgid):
for entry in config.wato_host_tags:
g_taggroups_by_id[entry[0]] = (entry[1], entry[2])
- return g_taggroups_by_id.get(tgid)
+ return g_taggroups_by_id.get(tgid, (_("N/A"), []))
def get_custom_var(row, key):
for name, val in zip(row["custom_variable_names"],