voxpupuli/puppetboard

Setting GRAPH_FACTS causes a 500 error

yakatz opened this issue · 0 comments

yakatz commented

Describe the bug

We set GRAPH_FACTS = "architecture,puppetversion,osfamily" in the config file. This seems to cause an error when loading node facts:

ERROR:puppetboard.core:Exception on /node/dc4.example.com/facts/json [GET]
Traceback (most recent call last):
  File "/srv/puppetboard/virtenv-puppetboard/lib64/python3.9/site-packages/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/srv/puppetboard/virtenv-puppetboard/lib64/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/srv/puppetboard/virtenv-puppetboard/lib64/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/srv/puppetboard/virtenv-puppetboard/lib64/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/srv/puppetboard/virtenv-puppetboard/lib64/python3.9/site-packages/puppetboard/views/facts.py", line 50, in fact_ajax
    if fact in app.config['GRAPH_FACTS'] and value is None and node is None:
TypeError: 'in <string>' requires string as left operand, not NoneType

Puppetboard version

4.3.0

Environment and installation method

  • Rocky Linux 9.2 with Python 3.9.16 from the OS repositories
  • installed with the Forge module v9.0.0 and using the PyPI package (default).