-
Notifications
You must be signed in to change notification settings - Fork 25
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
Issue with community.list #56
Comments
The code you replaced with should work identically. I'll run some tests |
the issue is here: if type_ is not None:
list_community["type"] = type_.value # < here it needs to be changed to: if type_ is not None:
list_community["type_"] = type_.value # see underscore was missing on the "type" string |
Ye the latter approach is better. It's what I've been using already as its future proof. |
@Demigodrick feel free to send that PR |
The only problem with using this: params: dict[str, Any] = {key: value for key, value in locals().items() if value is not None and key != "self"} is that there are enums where the actual value needs to be .value or we can change the enum class to do that automatically |
Not sure what you mean by "value needs to be .value" |
I mean like this: list_community["type_"] = type_.value |
Fixed in #58 |
Before I submit a PR I just wanted to check I wasnt doing something wrong and overcomplicating.
I was trying to run the following code:
But i found that the output was always ALL communities regardless of the variables, i.e listing type and sort type.
I've had a look at communities.py and changed:
to
Which now works when I pass the following:
To circle back to the original question - is this a bug in the original code (in which case I'll submit a PR) or is it me running the query wrong?
Thanks
The text was updated successfully, but these errors were encountered: