-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fixed filter by enum filter when label <> value #2971
Fixed filter by enum filter when label <> value #2971
Conversation
Could you add a test case for that issue? |
Sure, I will add tests. |
Refactored code to remove unnecessary calls to `parse_value`. Which were affecting filter by enum (rails >= 5.0): If enum defined like ``` enum size: { L: 'l', S: 's' } ``` Due to multiple calls, the chain when filtering by size is following: ``` parse_value("l") => "L" parse_value("L") => null ``` Which leads to non working filtering. NOTE: `parse_value` returns correct result in both cases above
work in progress. |
Turns out that fix provided in #2952 for |
Rails does not support yet pg v1.0.0 more details here: rails/rails#31669
@mshibuya I have added tests. And have rebased them, so it is possible to see in travis logs that without fix they are failing. |
Fixed filter by enum filter when label <> value
Merged in 8576961, thanks so much! |
👍 thank you. |
Refactored code to remove unnecessary calls to
parse_value
.Which were affecting filter by enum (rails >= 5.0):
If enum defined like
Due to multiple calls, the chain when filtering by size is following:
Which leads to non working filtering.
NOTE:
parse_value
returns correct result in both cases above