person: correct relationship no duplicate validator

This commit is contained in:
nobohan 2022-04-25 11:34:17 +02:00
parent 3ad8223949
commit f8410de569

View File

@ -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) {