Skip to content

Commit

Permalink
N°4314 - Fix Uniqueness rules not working with Silo (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
v-dumas committed Feb 28, 2024
1 parent 1394bc2 commit e8c11f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/dbobject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -2357,6 +2356,8 @@ protected function GetSearchForUniquenessRule($sUniquenessRuleId, $aUniquenessRu
$oUniquenessQuery->AddConditionForInOperatorUsingParam('finalclass', $aChildClassesWithRuleDisabled, false);
}

$oUniquenessQuery->AllowAllData();

return $oUniquenessQuery;
}

Expand Down

0 comments on commit e8c11f3

Please sign in to comment.