From f8410de569f96645fb3d1ee5fe29655e00f41863 Mon Sep 17 00:00:00 2001 From: nobohan Date: Mon, 25 Apr 2022 11:34:17 +0200 Subject: [PATCH] person: correct relationship no duplicate validator --- .../Relationship/RelationshipNoDuplicateValidator.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php index 0a326df36..580fc4b48 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php @@ -35,10 +35,8 @@ class RelationshipNoDuplicateValidator extends ConstraintValidator $toPerson = $relationship->getToPerson(); $relationships = $this->relationshipRepository->findBy([ - 'fromPerson' => $fromPerson, - 'fromPerson' => $toPerson, - 'toPerson' => $fromPerson, - 'toPerson' => $fromPerson, + 'fromPerson' => [$fromPerson, $toPerson], + 'toPerson' => [$fromPerson, $toPerson], ]); foreach ($relationships as $r) {