Skip to content

Commit d72102b

Browse files
authored
fix: pass 0 float values (#73)
* fix: pass 0 float values * chore: changelog * chore: lint
1 parent e692e34 commit d72102b

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to `audiostack` will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [2.10.1] - 2025-02-24
8+
- Fixed logic that removed 0 float values from payload
9+
10+
711
## [2.10.0] - 2025-02-13
812

913
### Added

audiostack/helpers/request_interface.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ def remove_empty(data: Any) -> Any:
2020

2121
final_dict = {}
2222
for key, val in data.items(): # type: ignore
23-
if val or isinstance(val, int): # val = int(0) shoud not be removed
23+
if (
24+
val or isinstance(val, int) or isinstance(val, float)
25+
): # val = int(0), float(0) should not be removed
2426
if isinstance(val, dict):
2527
final_dict[key] = remove_empty(val)
2628
elif isinstance(val, list):

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "audiostack"
3-
version = "2.10.0"
3+
version = "2.10.1"
44
description = "Python SDK for Audiostack API"
55
authors = ["Aflorithmic <[email protected]>"]
66
repository = "https://github.com/aflorithmic/audiostack-python"

0 commit comments

Comments
 (0)