-
Notifications
You must be signed in to change notification settings - Fork 768
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: declaration of required variable in filters v2 #1136
fix: declaration of required variable in filters v2 #1136
Conversation
Is there any chance we can add test for this too? I didn't understand how tests didn't fail before. |
yep I can add a test for it, good point. (it's when you don't use any automatic filters and only custom ones) |
There is a test failing which I have no idea what it is about... it doesn't seem linked to what I have changed and I can't reproduce this failure locally... any idea? |
I'll play with it this weekend, looks like names is an empty string when it attempts to generate an enum for the file path field. |
Can hack around it by modifying: graphene_django/converter.py: convert_choices_to_named_enum_with_descriptions
Python 2.7 doesn't handle enums with lists or tuples with zero entries - but works okay if we pass a set or generator. The file path field in the test has no child folders, therefor we get an empty set of choices. |
…able in filters v2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This is to fix the problem you reported @ulgens