Skip to content

Commit

Permalink
[5.x] Fix term filter on entries listing (#11268)
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean authored Dec 17, 2024
1 parent bccb3a0 commit 527f828
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 527f828

Please sign in to comment.