diff --git a/mail_debrand/models/mail_render_mixinANDmail_mail.py b/mail_debrand/models/mail_render_mixinANDmail_mail.py index d62f2a8..a63707f 100644 --- a/mail_debrand/models/mail_render_mixinANDmail_mail.py +++ b/mail_debrand/models/mail_render_mixinANDmail_mail.py @@ -28,7 +28,7 @@ class MailRenderMixin(models.AbstractModel): parent = elem.getparent() 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 bytes_text = etree.tostring( previous, pretty_print=True, method="html"