From 6331d8fd3e7c95d518381ee68c357049cfc4b0c2 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 23 Mar 2022 14:59:30 +0100 Subject: [PATCH] validation fix for person ressource --- src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php b/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php index 10476242f..b1022cf4c 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php @@ -231,7 +231,7 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface ->addViolation(); } - if ($this->person === $this->personOwner) { + if (null !== $this->person && $this->person === $this->personOwner) { $context->buildViolation('You cannot associate a resource with the same person') ->addViolation(); }