text can be empty too
This commit is contained in:
parent
62ffbca208
commit
4733dc8994
1 changed files with 4 additions and 1 deletions
|
@ -352,7 +352,10 @@ class Document(models.Model):
|
|||
elif key == 'rightslevel':
|
||||
setattr(self, key, int(data[key]))
|
||||
elif ktype == 'text':
|
||||
if data[key]:
|
||||
self.data[key] = ox.sanitize_html(data[key])
|
||||
else:
|
||||
del self.data[key]
|
||||
elif ktype == '[text]':
|
||||
self.data[key] = [ox.sanitize_html(t) for t in data[key]]
|
||||
elif ktype == '[string]':
|
||||
|
|
Loading…
Reference in a new issue