location: allow null value for location in Calendar

This commit is contained in:
nobohan 2021-11-03 13:43:34 +01:00 committed by Julien Fastré
parent c1f4e77293
commit 51938a99db

View File

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