This commit is contained in:
2023-08-17 14:49:29 +02:00
committed by Julie Lenaerts
parent 22241ca7b1
commit 95dfb4ba52
29 changed files with 42 additions and 40 deletions

View File

@@ -47,11 +47,9 @@ class RelationshipNoDuplicateValidator extends ConstraintValidator
foreach ($relationships as $r) {
if (spl_object_hash($r) !== spl_object_hash($value)
and
(
and (
($r->getFromPerson() === $fromPerson and $r->getToPerson() === $toPerson)
||
($r->getFromPerson() === $toPerson and $r->getToPerson() === $fromPerson)
|| ($r->getFromPerson() === $toPerson and $r->getToPerson() === $fromPerson)
)
) {
$this->context->buildViolation($constraint->message)