From 47034a0be9f91d7cef2986a534aaed2fdf589b26 Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Wed, 26 Jul 2023 13:26:22 -0400 Subject: [PATCH] Check if fact is None (default for full node view) Not sure how this ever worked - on a node page, `fact` defaults to `None` and produces this error `TypeError: 'in ' requires string as left operand, not NoneType` Fixes #907 --- puppetboard/views/facts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/puppetboard/views/facts.py b/puppetboard/views/facts.py index 17525ca32..6649071f9 100644 --- a/puppetboard/views/facts.py +++ b/puppetboard/views/facts.py @@ -47,7 +47,7 @@ def fact_ajax(env, node, fact, value): check_env(env, envs) render_graph = False - if fact in app.config['GRAPH_FACTS'] and value is None and node is None: + if fact is not None and fact in app.config['GRAPH_FACTS'] and value is None and node is None: render_graph = True query = AndOperator()