Skip to content

Commit

Permalink
restore siblings
Browse files Browse the repository at this point in the history
  • Loading branch information
gandalfthegreydev authored and OCA-git-bot committed Feb 16, 2024
1 parent 958ed1d commit 9d7e884
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions mail_debrand/models/mail_render_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ def remove_href_odoo(self, value, remove_parent=True, to_keep=None):
parent.getparent().remove(parent)

Check warning on line 41 in mail_debrand/models/mail_render_mixin.py

View check run for this annotation

Codecov / codecov/patch

mail_debrand/models/mail_render_mixin.py#L41

Added line #L41 was not covered by tests
else:
# also here can be powered by
if (remove_parent and parent.getparent() is not None) or (
len(elem.xpath("preceding-sibling")) == 0
and len(elem.xpath("following-sibling")) == 0
):
if remove_parent and parent.getparent() is not None:
parent.getparent().remove(parent)

Check warning on line 45 in mail_debrand/models/mail_render_mixin.py

View check run for this annotation

Codecov / codecov/patch

mail_debrand/models/mail_render_mixin.py#L45

Added line #L45 was not covered by tests
else:
parent.remove(elem)
Expand Down

0 comments on commit 9d7e884

Please sign in to comment.