mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
do not persist if no notification is scheduled
This commit is contained in:
parent
354f130e9e
commit
19561c63cb
@ -46,6 +46,7 @@ class PersistNotificationOnTerminateEventSubscriber implements EventSubscriberIn
|
||||
|
||||
private function persistNotifications(): void
|
||||
{
|
||||
if (0 < count($this->persister->getWaitingNotifications())) {
|
||||
foreach ($this->persister->getWaitingNotifications() as $notification) {
|
||||
$this->em->persist($notification);
|
||||
}
|
||||
@ -53,3 +54,4 @@ class PersistNotificationOnTerminateEventSubscriber implements EventSubscriberIn
|
||||
$this->em->flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user