Skip to content

Commit

Permalink
fixed palette error on choice type
Browse files Browse the repository at this point in the history
  • Loading branch information
koertho committed May 6, 2019
1 parent 3c76f15 commit d6ac423
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Backend/FilterConfigElement.php
Expand Up @@ -48,8 +48,8 @@ public function modifyPalette(DataContainer $dc)
}

foreach ($config['filter']['types'] as $type) {
if (isset($type['name']) && $type['name'] === $filterConfigElement->type && isset($type['type'])) {
$foundType = $type['type'];
if (isset($type['name']) && $type['name'] === $filterConfigElement->type) {
$foundType = $type['name'];

break;
}
Expand Down
8 changes: 4 additions & 4 deletions src/QueryBuilder/FilterQueryBuilder.php
Expand Up @@ -136,7 +136,7 @@ public function whereWidget(FilterConfigElementModel $element, string $name, Fil
$value = Controller::replaceInsertTags($value, false);
}

$operator = $this->getOperator($element, $defaultOperator, $dca);
$operator = $this->getOperator($element, $defaultOperator, $dca) ?:$defaultOperator;
} else {
$value = $data[$name] ?? ($element->customValue ? $element->value : null);

Expand All @@ -145,10 +145,10 @@ public function whereWidget(FilterConfigElementModel $element, string $name, Fil
}

$operator = $this->getOperator($element, $defaultOperator, $dca);
}

if (!$operator) {
return $this;
}
if (!$operator) {
return $this;
}

$this->andWhere(
Expand Down

0 comments on commit d6ac423

Please sign in to comment.