Filtering by category does not show results when the category name is a number
Fixes #4789
This commit is contained in:
committed by
Frédéric Guillot
parent
d3694294a0
commit
18ed87cbd3
@@ -34,7 +34,10 @@ class TaskCategoryFilter extends BaseFilter implements FilterInterface
|
||||
public function apply()
|
||||
{
|
||||
if (is_int($this->value) || ctype_digit((string) $this->value)) {
|
||||
$this->query->beginOr();
|
||||
$this->query->eq(TaskModel::TABLE.'.category_id', $this->value);
|
||||
$this->query->eq(CategoryModel::TABLE.'.name', $this->value);
|
||||
$this->query->closeOr();
|
||||
} elseif ($this->value === 'none') {
|
||||
$this->query->eq(TaskModel::TABLE.'.category_id', 0);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user