Skip to content

Commit

Permalink
api/base: cleanup parameters that are none
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Cukrowski committed Jan 3, 2023
1 parent 286f000 commit 07102da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nomad/api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 07102da

Please sign in to comment.