Skip to content

Commit 1b9f276

Browse files
committed
[update] always update system property on nested conditions
1 parent 21827e5 commit 1b9f276

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/Model/Scope.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,8 @@ public function addCondition($field, $operator = null, $value = null)
7777

7878
protected function setSystem($system = true)
7979
{
80-
if ($this->isAnd()) {
81-
foreach ($this->elements as $nestedCondition) {
82-
$nestedCondition->setSystem($system);
83-
}
80+
foreach ($this->elements as $nestedCondition) {
81+
$nestedCondition->setSystem($system && $this->isAnd());
8482
}
8583

8684
return $this;

0 commit comments

Comments
 (0)