[FIX] mail_debrand: TypeError: object of type 'NoneType' has no len()
This commit is contained in:
parent
7f6b13b660
commit
84986a7298
@ -28,7 +28,7 @@ class MailRenderMixin(models.AbstractModel):
|
|||||||
parent = elem.getparent()
|
parent = elem.getparent()
|
||||||
previous = elem.getprevious()
|
previous = elem.getprevious()
|
||||||
|
|
||||||
if remove_before and not remove_parent and len(previous):
|
if remove_before and not remove_parent and previous:
|
||||||
# remove 'using' that is before <a and after </span>
|
# remove 'using' that is before <a and after </span>
|
||||||
bytes_text = etree.tostring(
|
bytes_text = etree.tostring(
|
||||||
previous, pretty_print=True, method="html"
|
previous, pretty_print=True, method="html"
|
||||||
|
Loading…
Reference in New Issue
Block a user