[FIX] odoo_tools/mail.py: Crash at html2plaintext if no tree
What are the steps to reproduce your issue ?
1. Install website_blog
2. Go to website and add a new blog post
3. Remove the block content
4. Save and go to Blog page
What is currently happening ?
Crash:
Template fallback
An error occured while rendering the template website_blog.post_teaser
opw-241937
closes odoo/odoo#63844
X-original-commit: d9097c2b6244154ea64142b5e8fd31cfdd34e66e
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -304,7 +304,7 @@ def html2plaintext(html, body_id=None, encoding='utf-8'):
|
||||
|
||||
html = ustr(html)
|
||||
|
||||
if not html:
|
||||
if not html.strip():
|
||||
return ''
|
||||
|
||||
tree = etree.fromstring(html, parser=etree.HTMLParser())
|
||||
|
||||
Reference in New Issue
Block a user