location: allow null value for location in Activity

This commit is contained in:
nobohan 2021-11-03 13:42:35 +01:00 committed by Julien Fastré
parent bfb219746a
commit c1f4e77293

View File

@ -313,7 +313,7 @@ class ActivityType extends AbstractType
}
return $location->getId();
},
function (?string $id): Location {
function (?string $id): ?Location {
return $this->om->getRepository(Location::class)->findOneBy(['id' => (int) $id]);
}
))