This commit is contained in:
2023-08-17 14:49:29 +02:00
committed by Julien Fastré
parent fe1fe31b68
commit 75bca46b98
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)