From be694b08933975d74f90ea0fb3e6f21fa6947bdb Mon Sep 17 00:00:00 2001 From: Matyas Selmeci Date: Fri, 17 May 2024 15:32:48 -0500 Subject: [PATCH] Make filters arg optional to get_namespaces_info() (SOFTWARE-5862) --- src/stashcache.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/stashcache.py b/src/stashcache.py index df43e210e..f2db0de99 100644 --- a/src/stashcache.py +++ b/src/stashcache.py @@ -538,7 +538,7 @@ def get_scitokens_list_for_namespace(ns: Namespace) -> List[Dict]: ) -def get_namespaces_info(global_data: GlobalData, filters: NamespacesFilters) -> PreJSON: +def get_namespaces_info(global_data: GlobalData, filters: Optional[NamespacesFilters] = None) -> PreJSON: """Return data for the /stashcache/namespaces JSON endpoint. This includes a list of caches and origins, with some data about their endpoints, @@ -547,6 +547,9 @@ def get_namespaces_info(global_data: GlobalData, filters: NamespacesFilters) -> If `include_downed` is True, caches/origins in downtime are also included. If `include_inactive` is True, caches/origins that are not marked as active are also included. """ + if filters is None: + filters = NamespacesFilters() + # Helper functions def _service_resource_dict(