From 5947f2295b55b95fbf652def930edebdb137fea2 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 21 Feb 2017 17:46:16 +0100 Subject: [PATCH] only delete existing values --- pandora/document/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/document/models.py b/pandora/document/models.py index 8c9f676d..5d0c8f51 100644 --- a/pandora/document/models.py +++ b/pandora/document/models.py @@ -368,7 +368,7 @@ class Document(models.Model): else: if data[key]: self.data[key] = ox.escape_html(data[key]) - else: + elif key in self.data: del self.data[key] @property