Mark all toOne associations in Stats Notification nullable
[MAILPOET-2818]
This commit is contained in:
committed by
Veljko V
parent
5b457a1693
commit
bbde4b1c1c
@ -100,7 +100,11 @@ class Worker {
|
||||
throw $e;
|
||||
}
|
||||
} finally {
|
||||
$this->markTaskAsFinished($statsNotificationEntity->getTask());
|
||||
$task = $statsNotificationEntity->getTask();
|
||||
if ($task instanceof ScheduledTask) {
|
||||
$this->markTaskAsFinished($task);
|
||||
}
|
||||
|
||||
}
|
||||
$this->cronHelper->enforceExecutionLimit($timer);
|
||||
}
|
||||
@ -108,6 +112,9 @@ class Worker {
|
||||
|
||||
private function constructNewsletter(StatsNotificationEntity $statsNotificationEntity) {
|
||||
$newsletter = $statsNotificationEntity->getNewsletter();
|
||||
if (!$newsletter instanceof NewsletterEntity) {
|
||||
throw new \RuntimeException('Missing newsletter entity for statistic notification.');
|
||||
}
|
||||
$link = $this->newsletterLinkRepository->findTopLinkForNewsletter((int)$newsletter->getId());
|
||||
$context = $this->prepareContext($newsletter, $link);
|
||||
$subject = $newsletter->getLatestQueue()->getNewsletterRenderedSubject();
|
||||
|
Reference in New Issue
Block a user