mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +00:00
Do not fail displaying notification when workflow has been deleted
This commit is contained in:
@@ -33,7 +33,7 @@ class WorkflowNotificationHandler implements NotificationHandlerInterface
|
||||
|
||||
return [
|
||||
'entity_workflow' => $entityWorkflow,
|
||||
'handler' => $this->entityWorkflowManager->getHandler($entityWorkflow),
|
||||
'handler' => null !== $entityWorkflow ? $this->entityWorkflowManager->getHandler($entityWorkflow): null,
|
||||
'notificationCc' => $this->isNotificationCc($notification),
|
||||
];
|
||||
}
|
||||
@@ -45,6 +45,10 @@ class WorkflowNotificationHandler implements NotificationHandlerInterface
|
||||
if (EntityWorkflow::class === $notification->getRelatedEntityClass()) {
|
||||
$relatedEntity = $this->entityWorkflowRepository->findOneBy(['id' => $notification->getRelatedEntityId()]);
|
||||
|
||||
if (null === $relatedEntity) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($relatedEntity->getCurrentStepCreatedBy() !== $this->security->getUser()) {
|
||||
$notificationCc = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user