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: incompatibility with PostgreSQL in people search #2055

Merged
merged 6 commits into from
Nov 30, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Search: compatibility with PostgreSQL
The search query used the comparison operator in a non-standard way, incompatible with PostgreSQL (HTTP error 500 in people/search). PostgreSQL does not do the implicit casting from integer to boolean, you must explicitly write TRUE/FALSE (recommended) or implement explicit casting (not ideal with frequent queries).
  • Loading branch information
LorenzoAncora authored Nov 15, 2018
commit 04a5c19df665189378049b23f7dbd08ecef11d7e
2 changes: 1 addition & 1 deletion app/Helpers/SearchHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static function searchContacts($query, $limitPerPage, $order)
]);
})->paginate($limitPerPage);
} else {
$results = Contact::search($needle, $accountId, $limitPerPage, $order, 'and is_partial=0');
$results = Contact::search($needle, $accountId, $limitPerPage, $order, 'AND is_partial = FALSE');
}

return $results;
Expand Down