Compare element to replace new view tree from inherit application against None

lxml raises a warning about truth-testing on element.

Close #14429
This commit is contained in:
Cédric Krier
2025-12-16 11:56:31 +01:00
parent 891a1fba98
commit 704da3630b
+1 -1
View File
@@ -347,7 +347,7 @@ class View(
position = element.get('position', 'inside')
new_tree = getattr(cls, '_inherit_apply_%s' % position)(
tree, element, target)
if new_tree:
if new_tree is not None:
tree = new_tree
return tree