[REF] mail_debrand: Fix FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
This commit is contained in:
parent
705138dce1
commit
caf5fd4f6d
@ -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 previous:
|
if remove_before and not remove_parent and previous is not None:
|
||||||
# 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