From d16a7dfc1d1dae8f2c4f743d5f1d905405b69460 Mon Sep 17 00:00:00 2001 From: Alice Butcher Date: Thu, 4 Jul 2024 12:35:48 +0100 Subject: [PATCH] fix: get the reports list from status_list action --- ckanext/nhm/lib/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/nhm/lib/helpers.py b/ckanext/nhm/lib/helpers.py index 3b99375b..d434e6cc 100644 --- a/ckanext/nhm/lib/helpers.py +++ b/ckanext/nhm/lib/helpers.py @@ -1613,7 +1613,7 @@ def get_status_indicator(): return 'red' try: - status_reports = toolkit.get_action('status_list')({}, {}) + status_reports = toolkit.get_action('status_list')({}, {}).get('reports', []) except KeyError: # if the action doesn't exist status_reports = []