From 58034617350a78079a642f99755ffd3c7e1bfdab Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Tue, 26 Nov 2024 16:11:17 +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 it 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 468846132..8b7cd39eb 100644 --- a/library/Icingadb/Web/Control/SearchBar/ObjectSuggestions.php +++ b/library/Icingadb/Web/Control/SearchBar/ObjectSuggestions.php @@ -305,7 +305,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();