From a189231a7a244487155b417a8fd676c1c616c572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laur=C3=A9line=20Gu=C3=A9rin?= Date: Thu, 21 Jul 2022 22:32:18 +0200 Subject: [PATCH] snapshot: fix inspect comparison with empty ins/del (#67628) --- wcs/backoffice/snapshots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'):