mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch '82_bundles_filiation_delete_fix' into 'master'
#82 filiation delete/patch fix See merge request Chill-Projet/chill-bundles!548
This commit is contained in:
commit
45724100d4
@ -46,11 +46,13 @@ class RelationshipNoDuplicateValidator extends ConstraintValidator
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
foreach ($relationships as $r) {
|
foreach ($relationships as $r) {
|
||||||
if (
|
if (spl_object_hash($r) !== spl_object_hash($value)
|
||||||
$r->getFromPerson() === $fromPerson
|
and
|
||||||
|| $r->getFromPerson() === $toPerson
|
(
|
||||||
|| $r->getToPerson() === $fromPerson
|
($r->getFromPerson() === $fromPerson and $r->getToPerson() === $toPerson)
|
||||||
|| $r->getToPerson() === $toPerson
|
||
|
||||||
|
($r->getFromPerson() === $toPerson and $r->getToPerson() === $fromPerson)
|
||||||
|
)
|
||||||
) {
|
) {
|
||||||
$this->context->buildViolation($constraint->message)
|
$this->context->buildViolation($constraint->message)
|
||||||
->addViolation();
|
->addViolation();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user