Fix delete action for accompanying periods, missed in previous correction

This commit is contained in:
Julie Lenaerts 2024-08-21 15:13:18 +02:00
parent 6362b98a00
commit 2bfb8fe387

View File

@ -109,11 +109,10 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle
'accompanying_period_id' => $accompanyingCourse->getId(), 'accompanying_period_id' => $accompanyingCourse->getId(),
'person_id' => $person_id, 'person_id' => $person_id,
])) ]))
->setMethod('DELETE')
->add('submit', SubmitType::class, ['label' => 'Delete']) ->add('submit', SubmitType::class, ['label' => 'Delete'])
->getForm(); ->getForm();
if (Request::METHOD_DELETE === $request->getMethod()) { if (Request::METHOD_POST === $request->getMethod()) {
$form->handleRequest($request); $form->handleRequest($request);
if ($form->isValid()) { if ($form->isValid()) {