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

lxml raises a warning about truth-testing on element.

Close #14429
(grafted from 8743690048a7874266e00696dd47df831e02c6c9)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier committed 2025-12-16 11:56:31 +01:00
1 parent 5197689bcf
commit 082d3e88fa
1 file changed
+1 -1
+1 -1
View File
@@ -286,7 +286,7 @@ class View(ModelSQL, ModelView):
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