only cleanup if needed

This commit is contained in:
j 2017-03-12 14:51:52 +02:00
parent 4733dc8994
commit ed7a56a5e9
1 changed files with 1 additions and 1 deletions

View File

@ -354,7 +354,7 @@ class Document(models.Model):
elif ktype == 'text':
if data[key]:
self.data[key] = ox.sanitize_html(data[key])
else:
elif key in self.data:
del self.data[key]
elif ktype == '[text]':
self.data[key] = [ox.sanitize_html(t) for t in data[key]]