From e8c11f38d2fca454a3b46fe759499affadd034fc Mon Sep 17 00:00:00 2001 From: vdumas Date: Wed, 28 Feb 2024 09:59:42 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B04314=20-=20Fix=20Uniqueness=20rules=20no?= =?UTF-8?q?t=20working=20with=20Silo=20(2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/dbobject.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/dbobject.class.php b/core/dbobject.class.php index 52deb38685..2d627b6813 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -2311,7 +2311,6 @@ private function GetUniquenessRuleGenericMessage(string $sCurrentClass, string $ protected function HasObjectsInDbForUniquenessRule($sUniquenessRuleId, $aUniquenessRuleProperties) { $oUniquenessQuery = $this->GetSearchForUniquenessRule($sUniquenessRuleId, $aUniquenessRuleProperties); - $oUniquenessQuery->AllowAllData(); $oUniquenessDuplicates = new DBObjectSet($oUniquenessQuery); $bHasDuplicates = $oUniquenessDuplicates->CountExceeds(0); @@ -2357,6 +2356,8 @@ protected function GetSearchForUniquenessRule($sUniquenessRuleId, $aUniquenessRu $oUniquenessQuery->AddConditionForInOperatorUsingParam('finalclass', $aChildClassesWithRuleDisabled, false); } + $oUniquenessQuery->AllowAllData(); + return $oUniquenessQuery; }