Fixed: fix CS + fix "my workflow" api when course or work has been delete

This commit is contained in:
2023-07-14 09:44:05 +02:00
parent 59da93fd75
commit 1cc61cee36
3 changed files with 11 additions and 9 deletions

View File

@@ -46,8 +46,7 @@ class AccompanyingCourseDocumentWorkflowHandler implements EntityWorkflowHandler
public function getEntityData(EntityWorkflow $entityWorkflow, array $options = []): array
{
$course = $this->getRelatedEntity($entityWorkflow)
->getCourse();
$course = $this->getRelatedEntity($entityWorkflow)?->getCourse();
$persons = [];
if (null !== $course) {