fixed: unable to create a course (due to method change in activity entity)

This commit is contained in:
Julien Fastré 2022-07-12 10:44:40 +02:00
parent 5f6c11bde9
commit 11d1b26efc

View File

@ -416,7 +416,7 @@ final class ActivityController extends AbstractController
$this->denyAccessUnlessGranted(ActivityVoter::CREATE, $entity);
$form = $this->createForm(ActivityType::class, $entity, [
'center' => $entity->getCenter(),
'center' => $entity->getCenters()[0] ?? null,
'role' => new Role('CHILL_ACTIVITY_CREATE'),
'activityType' => $entity->getActivityType(),
'accompanyingPeriod' => $accompanyingPeriod,