diff --git a/wcs/backoffice/snapshots.py b/wcs/backoffice/snapshots.py index 24194cd8c..5f9c937f4 100644 --- a/wcs/backoffice/snapshots.py +++ b/wcs/backoffice/snapshots.py @@ -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'):