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,10 +46,12 @@ class PersistNotificationOnTerminateEventSubscriber implements EventSubscriberIn
|
|||||||
|
|
||||||
private function persistNotifications(): void
|
private function persistNotifications(): void
|
||||||
{
|
{
|
||||||
foreach ($this->persister->getWaitingNotifications() as $notification) {
|
if (0 < count($this->persister->getWaitingNotifications())) {
|
||||||
$this->em->persist($notification);
|
foreach ($this->persister->getWaitingNotifications() as $notification) {
|
||||||
}
|
$this->em->persist($notification);
|
||||||
|
}
|
||||||
|
|
||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user