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

APIv4 - Skip empty leaves in WHERE clause #17576

Merged
merged 1 commit into from
Jun 11, 2020

Conversation

colemanw
Copy link
Member

Overview

Fixes an annoying problem with search builder where the api gives a sql error while building your where clause.

Before

Empty AND/OR/NOT branches in the WHERE clause generate a sql syntax error: WHERE (AND ())

After

The solution is to skip empty leaves, treating them as WIP.

Fixes an annoying problem with search builder
where the api gives a sql error while building your where clause.
The solution is to skip empty leaves, treating them as WIP.
@civibot
Copy link

civibot bot commented Jun 11, 2020

(Standard links)

@civibot civibot bot added the master label Jun 11, 2020
@eileenmcnaughton eileenmcnaughton merged commit 13edf33 into civicrm:master Jun 11, 2020
@eileenmcnaughton eileenmcnaughton deleted the emptyLeaf branch June 11, 2020 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants