From e9970dc0a1f0d5e31f6022bc408c74bb253e596e Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Thu, 16 Jan 2025 15:46:42 +0100 Subject: [PATCH] ObjectSuggestions: Don't apply base filter to $customVars query The basefilter may contain relations, that are not know to `CustomvarFlat`, which can leads to errors. For example: RedundancygroupController:completeActions's base filter is not known to `CustomvarFlat`. --- library/Icingadb/Web/Control/SearchBar/ObjectSuggestions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icingadb/Web/Control/SearchBar/ObjectSuggestions.php b/library/Icingadb/Web/Control/SearchBar/ObjectSuggestions.php index 3c4382fc5..0ffa16489 100644 --- a/library/Icingadb/Web/Control/SearchBar/ObjectSuggestions.php +++ b/library/Icingadb/Web/Control/SearchBar/ObjectSuggestions.php @@ -301,7 +301,7 @@ protected function queryCustomvarConfig(string $searchTerm): Select } $customVars->columns('flatname'); - $this->applyBaseFilter($customVars); + $this->applyRestrictions($customVars); $customVars->filter(Filter::like('flatname', $searchTerm)); $idColumn = $resolver->qualifyColumn('id', $resolver->getAlias($customVars->getModel())); $customVars = $customVars->assembleSelect();