mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 18:58:46 +02:00
Only enable Choice and InstanceOfConstraints if a value is provided
This commit is contained in:
parent
7d99607919
commit
218b0adb8f
2 changed files with 2 additions and 2 deletions
|
@ -70,7 +70,7 @@ class ChoiceConstraint extends AbstractConstraint
|
|||
|
||||
public function isEnabled(): bool
|
||||
{
|
||||
return $this->operator !== '';
|
||||
return $this->operator !== '' && count($this->value) > 0;
|
||||
}
|
||||
|
||||
public function apply(QueryBuilder $queryBuilder): void
|
||||
|
|
|
@ -77,7 +77,7 @@ class InstanceOfConstraint extends AbstractConstraint
|
|||
|
||||
public function isEnabled(): bool
|
||||
{
|
||||
return $this->operator !== '';
|
||||
return $this->operator !== '' && count($this->value) > 0;
|
||||
}
|
||||
|
||||
public function apply(QueryBuilder $queryBuilder): void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue