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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user