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

fix: empty list is not an empty value for list filters even when a custom filtering method is provided #1450

Merged

Conversation

tcleonard
Copy link
Collaborator

@tcleonard tcleonard commented Aug 10, 2023

No description provided.

@tcleonard tcleonard force-pushed the fix/list-filter-custom-method branch 3 times, most recently from 1167ba6 to 486b019 Compare August 10, 2023 14:11
Copy link
Collaborator

@sjdemartini sjdemartini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, and thanks for adding the tests!

graphene_django/filter/filters/list_filter.py Outdated Show resolved Hide resolved
@tcleonard tcleonard force-pushed the fix/list-filter-custom-method branch 2 times, most recently from 887ee5c to 28ee5dd Compare August 11, 2023 12:15
@firaskafri
Copy link
Collaborator

firaskafri commented Aug 11, 2023

@tcleonard long time! glad you have time to make great contributions like before!
is this still a WIP?

@tcleonard
Copy link
Collaborator Author

I just pushed an update taking into account your suggestion and revamping the tests. Let me know what you think

@tcleonard tcleonard force-pushed the fix/list-filter-custom-method branch from 28ee5dd to 91ca4ba Compare August 11, 2023 12:26
graphene_django/compat.py Outdated Show resolved Hide resolved
@tcleonard tcleonard force-pushed the fix/list-filter-custom-method branch 3 times, most recently from ee16c2f to e5b0e1f Compare August 11, 2023 13:30
Copy link
Collaborator

@sjdemartini sjdemartini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for handling the ArrayField as well and for adding more test coverage there too (and nice job getting a workaround for non-Postgres environments)!

graphene_django/filter/filters/array_filter.py Outdated Show resolved Hide resolved
graphene_django/filter/filters/list_filter.py Outdated Show resolved Hide resolved
@tcleonard tcleonard force-pushed the fix/list-filter-custom-method branch from e5b0e1f to 448ec76 Compare August 11, 2023 15:16
@tcleonard
Copy link
Collaborator Author

if anyone of you has merge permissions (I don't seem to have them anymore), could you merge this please? 🙏

@kiendang kiendang merged commit 0473f1a into graphql-python:main Aug 11, 2023
12 checks passed
@tcleonard tcleonard deleted the fix/list-filter-custom-method branch August 16, 2023 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants