Skip to content

Commit

Permalink
Merge pull request #25 from telstra/feature/v3
Browse files Browse the repository at this point in the history
3.3.16
  • Loading branch information
zhanganderson authored Aug 30, 2024
2 parents f2b3614 + 008c107 commit 5ce6e6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion telstra/messaging/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,6 @@ def _validate_get_all_args(
f'received "{endTime}"'
)


if reverse is not None and not isinstance(reverse, types.TReverse):
raise exceptions.MessageError(
'the value of "reverse" is not valid, expected a bool, '
Expand Down
8 changes: 6 additions & 2 deletions telstra/messaging/utils/querystring.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ def build(**kwargs) -> str:
if params:
query_dict = eval(params)
else:
query_dict = {k: 'true' if v is True else 'false' if v is False else v for k, v in kwargs.items() if v is not None}
query_dict = {
k: "true" if v is True else "false" if v is False else v
for k, v in kwargs.items()
if v is not None
}
query_string = urlencode(query_dict)
if query_string:
return f"?{query_string}"
return ""
return ""

0 comments on commit 5ce6e6d

Please sign in to comment.