fix: fix query

pull/9050/head
Luciano Righetti 2023-05-02 09:58:10 +02:00
parent bb9e406f85
commit a8076f6344
1 changed files with 7 additions and 4 deletions

View File

@ -3021,13 +3021,16 @@ class AttributesController extends AppController
return !empty($sg);
}
private function __setIndexFilterConditions() {
private function __setIndexFilterConditions()
{
// search by attribute value
if ($this->params['named']['searchvalue']) {
$v = $this->params['named']['searchvalue'];
$this->paginate['conditions']['AND']['OR'] = [
['Attribute.value1' => $v],
['Attribute.value2' => $v],
$this->paginate['conditions']['AND'][] = [
'OR' => [
['Attribute.value1' => $v],
['Attribute.value2' => $v],
]
];
}
}