mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +00:00
Handle cases when there are multiple EntityWorkflows associated with one entity
This commit is contained in:
@@ -135,10 +135,10 @@ class AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler implements EntityW
|
||||
return false;
|
||||
}
|
||||
|
||||
public function findByRelatedEntity(object $object): ?EntityWorkflow
|
||||
public function findByRelatedEntity(object $object): array
|
||||
{
|
||||
if (!$object instanceof AccompanyingPeriodWorkEvaluationDocument) {
|
||||
return null;
|
||||
return [];
|
||||
}
|
||||
|
||||
return $this->workflowRepository->findByRelatedEntity(AccompanyingPeriodWorkEvaluationDocument::class, $object->getId());
|
||||
|
Reference in New Issue
Block a user