validation fix for person ressource

This commit is contained in:
Julie Lenaerts 2022-03-23 14:59:30 +01:00
parent 61f010f5ad
commit 6331d8fd3e

View File

@ -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();
}