diff --git a/cwms/api.py b/cwms/api.py index 1dba6bee..17267ffb 100644 --- a/cwms/api.py +++ b/cwms/api.py @@ -309,7 +309,7 @@ def post( # post requires different headers than get for headers = {"accept": "*/*", "Content-Type": api_version_text(api_version)} - if isinstance(data, dict): + if isinstance(data, dict) or isinstance(data, list): data = json.dumps(data) response = SESSION.post(endpoint, params=params, headers=headers, data=data) @@ -349,7 +349,7 @@ def patch( if data is None: response = SESSION.patch(endpoint, params=params, headers=headers) else: - if isinstance(data, dict): + if isinstance(data, dict) or isinstance(data, list): data = json.dumps(data) response = SESSION.patch(endpoint, params=params, headers=headers, data=data) response.close() diff --git a/pyproject.toml b/pyproject.toml index 6119bd69..3a05ca7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "cwms-python" -version = "0.5.5" +version = "0.5.6" packages = [ { include = "cwms" },