Simplify newsletter body data repair

[MAILPOET-3430]
This commit is contained in:
Jan Lysý
2021-02-24 15:41:56 +01:00
committed by Veljko V
parent 78717509c8
commit 878e3eb28f
4 changed files with 18 additions and 20 deletions

View File

@ -107,8 +107,7 @@ class NewsletterSaveController {
if (!empty($data['template_id'])) {
$template = $this->newsletterTemplatesRepository->findOneById($data['template_id']);
if ($template) {
$body = $this->dataSanitizer->sanitizeBody($template->getBody() ?: []);
$data['body'] = json_encode($body);
$data['body'] = json_encode($template->getBody());
}
}