Simplify fetching a single result from database
[MAILPOET-2439]
This commit is contained in:
committed by
Jack Kitterhing
parent
20ad724a98
commit
ac9761228a
@ -102,11 +102,7 @@ class Worker {
|
||||
|
||||
private function constructNewsletter(StatsNotificationEntity $stats_notification_entity) {
|
||||
$newsletter = $stats_notification_entity->getNewsletter();
|
||||
try {
|
||||
$link = $this->newsletter_link_repository->findTopLinkForNewsletter($newsletter->getId());
|
||||
} catch (\MailPoetVendor\Doctrine\ORM\UnexpectedResultException $e) {
|
||||
$link = null;
|
||||
}
|
||||
$link = $this->newsletter_link_repository->findTopLinkForNewsletter($newsletter->getId());
|
||||
$context = $this->prepareContext($newsletter, $link);
|
||||
$subject = $newsletter->getLatestQueue()->getNewsletterRenderedSubject();
|
||||
return [
|
||||
|
Reference in New Issue
Block a user