Skip to content

Fix searching for ids with selected list input#489

Merged
rjherrera merged 1 commit into
platanus:v1from
vaot:fix-selected-list-input-search-by-id
Sep 10, 2024
Merged

Fix searching for ids with selected list input#489
rjherrera merged 1 commit into
platanus:v1from
vaot:fix-selected-list-input-search-by-id

Conversation

@vaot

@vaot vaot commented Nov 24, 2023

Copy link
Copy Markdown

Motivation / Background

  • When searching for multiple fields including id, other searchable inputs force the predicate to eq rather than cont, and selected-list does not, which results in a SQL error.

Detail

This Pull Request changes the predicate to eq when the field is id.

Additional information

From:

{"groupings"=>{"0"=>{"m"=>"or", "name_cont"=>"test", "id_cont"=>"test"}}, "combinator"=>"and"}

To:

{"groupings"=>{"0"=>{"m"=>"or", "name_cont"=>"test", "id_eq"=>"test"}}, "combinator"=>"and"}

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a concise description of what changed and why.
  • Tests are added or updated if you fix a bug or add a feature.
  • Documentation has been added or updated if you add a feature or modify an existing one.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature (under the "Unreleased" heading if this is not a version change).
  • My changes don't introduce any linter rule violations.

@vaot vaot force-pushed the fix-selected-list-input-search-by-id branch from a7f7217 to 24d9ac0 Compare November 25, 2023 00:26

@rjherrera rjherrera left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

long overdue review, sorry about that, this looks good, thanks for the PR

@rjherrera rjherrera force-pushed the fix-selected-list-input-search-by-id branch from 24d9ac0 to 2ad5ab9 Compare September 10, 2024 16:13
@rjherrera rjherrera merged commit fe81206 into platanus:v1 Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants