snapshot: fix inspect comparison with empty ins/del (#67628)
gitea-wip/wcs/pipeline/head Build started... Details

This commit is contained in:
Lauréline Guérin 2022-07-21 22:32:18 +02:00
parent 225d1dacef
commit a189231a7a
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ class SnapshotsDirectory(Directory):
# remove empty ins and del tags
for elem in panel.find('ins, del'):
d = pq(elem)
if not d.html().strip():
if not (d.html() or '').strip():
d.remove()
# prevent auto-closing behaviour of pyquery .html() method
for elem in panel.find('span, ul, div'):