clear empty metadata values on edit, fixes #440

This commit is contained in:
j 2012-02-13 16:50:34 +05:30
parent af647a86ac
commit ff1ce07e26

View file

@ -226,6 +226,10 @@ class Item(models.Model):
d.description = data.pop(key)
d.save()
for key in data:
if data[key] == None:
if key in self.data:
del self.data[key]
else:
self.data[key] = data[key]
return self.save()