diff --git a/nomad/api/base.py b/nomad/api/base.py index 008671b..22f6e3a 100644 --- a/nomad/api/base.py +++ b/nomad/api/base.py @@ -84,6 +84,9 @@ def _query_string_builder(self, endpoint, params=None): if not isinstance(params, dict): params = {} + # Remove parameters that are None + params = {key: val for key, val in params.items() if val is not None} + if ("namespace" not in params) and (self.namespace and self._required_namespace(endpoint)): query_string["namespace"] = self.namespace