Skip to content

Commit b1bc7b9

Browse files
committed
fix: pass 0 float values (#73)
* fix: pass 0 float values * chore: changelog * chore: lint
1 parent afa6d94 commit b1bc7b9

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ def remove_empty(data: Any) -> Any:
1919

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

pyproject.toml

Lines changed: 1 addition & 1 deletion
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)