Skip to content

Commit

Permalink
fix: search organism by name query update
Browse files Browse the repository at this point in the history
  • Loading branch information
CS76 committed Aug 10, 2024
1 parent b99b93a commit 6e0d614
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Actions/Coconut/SearchMolecule.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ private function buildTagsStatement($offset)
$this->organisms = array_map('strtolower', array_map('trim', explode(',', $this->query)));
$organismIds = Organism::where(function ($query) {
foreach ($this->organisms as $name) {
$query->orWhereRaw('LOWER(name) = ?', [$name]);
$query->orWhereRaw('LOWER(name) LIKE ?', ['%'.strtolower($name).'%']);
}
})->pluck('id');

Expand Down

0 comments on commit 6e0d614

Please sign in to comment.