Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when calling lists_membership on a member of class user, the wrong user is queried #1443

Closed
brett-schneider opened this issue Oct 2, 2020 · 2 comments · Fixed by #1444
Closed
Labels
Bug This is regarding a bug with the library
Milestone

Comments

@brett-schneider
Copy link
Contributor

after querying people i follow (frens = api.friends), i wanted to find out in which list i or others keep them (frens[0].lists_membership()). from my understanding, frens[0].lists_membership() should return a list of lists that fren[0] is a member of. however i'm getting a list of lists that auth_user is a member of. i looked in model.py, which looks fine. could there be an issue with the unwrapping of resultset?

@brett-schneider
Copy link
Contributor Author

this looks suspicious:
user=self.screen_name
at models.py line 199

@joshthecoder joshthecoder linked a pull request Oct 29, 2020 that will close this issue
@Harmon758
Copy link
Member

To clarify, this occurs because User.lists_membership passes the screen_name as user to API.lists_membership:

return self._api.lists_memberships(user=self.screen_name,
which is not an allowed parameter, so the GET lists/memberships endpoint defaults to the memberships for the authenticating user instead.

@Harmon758 Harmon758 added the Bug This is regarding a bug with the library label Dec 25, 2020
@Harmon758 Harmon758 added this to the 3.10 milestone Dec 25, 2020
Harmon758 added a commit that referenced this issue Dec 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is regarding a bug with the library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants