Skip to content

Commit

Permalink
Fix term filter on entries listing
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Dec 17, 2024
1 parent c0318e9 commit df3bab8
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Query/Scopes/Filters/Fields/Terms.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Statamic\Query\Scopes\Filters\Fields;

use Statamic\Facades;
use Statamic\Support\Str;

class Terms extends FieldtypeFilter
{
Expand All @@ -21,12 +20,7 @@ public function fieldItems()

public function apply($query, $handle, $values)
{
$term = $values['term'];

$term = Str::ensureLeft($term, '%');
$term = Str::ensureRight($term, '%');

$query->where($handle, 'like', $term);
$query->whereJsonContains($handle, $values['term']);
}

public function badge($values)
Expand Down

0 comments on commit df3bab8

Please sign in to comment.