Skip to content

Commit 0a4aaa1

Browse files
authoredOct 5, 2022
serialize boolean parameters as lowercase strings in url (#313)
* serialize boolean parameters as lowercase strings in url * fix unit tests * fix last unit test * fix last unit test, for real * lint
1 parent 0515771 commit 0a4aaa1

6 files changed

+2
-0
lines changed
 

‎polygon/rest/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ def _get_params(
126126
val = caller_locals.get(argname, v.default)
127127
if isinstance(val, Enum):
128128
val = val.value
129+
elif isinstance(val, bool):
130+
val = str(val).lower()
129131
elif isinstance(val, datetime):
130132
val = int(val.timestamp() * self.time_mult(datetime_res))
131133
if val is not None:

0 commit comments

Comments
 (0)
Please sign in to comment.