Skip to content

Commit fb3f9e0

Browse files
updating build_path helper to handle boolean as <str> while encoding params.
1 parent 38f9641 commit fb3f9e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jigsawstack/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def build_path(base_path: str, params: Optional[Dict[str, Union[str, int, bool]]
1717
return base_path
1818

1919
#remove None values from the parameters
20-
filtered_params = {k: v for k, v in params.items() if v is not None}
20+
filtered_params = { k: str(v).lower() if isinstance(v, bool) else v for k, v in params.items() if v is not None}
2121

2222
#encode the parameters
2323
return f"{base_path}?{urlencode(filtered_params)}" if filtered_params else base_path

0 commit comments

Comments
 (0)