Skip to content

Commit

Permalink
Fix: #1671 Convert Python Bool to API Parameter for Authenticated Use…
Browse files Browse the repository at this point in the history
…r Notifications (#2001)

The parameters 'all' and 'participating' for AuthenticatedUser.get_notifications() should
be lower case strings, not textual forms of a boolean.

Fixes: #1671
  • Loading branch information
sshekdar-VMware committed Oct 11, 2021
1 parent d2d59f9 commit 1da600a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions github/AuthenticatedUser.py
Expand Up @@ -973,9 +973,11 @@ def get_notifications(

params = dict()
if all is not github.GithubObject.NotSet:
params["all"] = all
# convert True, False to true, false for api parameters
params["all"] = "true" if all else "false"
if participating is not github.GithubObject.NotSet:
params["participating"] = participating
# convert True, False to true, false for api parameters
params["participating"] = "true" if participating else "false"
if since is not github.GithubObject.NotSet:
params["since"] = since.strftime("%Y-%m-%dT%H:%M:%SZ")
if before is not github.GithubObject.NotSet:
Expand Down

0 comments on commit 1da600a

Please sign in to comment.