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

@@ -47,8 +47,7 @@ class AccompanyingPeriodWorkWorkflowHandler implements EntityWorkflowHandlerInte
public function getEntityData(EntityWorkflow $entityWorkflow, array $options = []): array
{
return [
'persons' => $this->getRelatedEntity($entityWorkflow)
->getPersons(),
'persons' => $this->getRelatedEntity($entityWorkflow)?->getPersons() ?? [],
];
}