clear empty metadata values on edit, fixes #440
This commit is contained in:
parent
af647a86ac
commit
ff1ce07e26
1 changed files with 5 additions and 1 deletions
|
@ -226,6 +226,10 @@ class Item(models.Model):
|
||||||
d.description = data.pop(key)
|
d.description = data.pop(key)
|
||||||
d.save()
|
d.save()
|
||||||
for key in data:
|
for key in data:
|
||||||
|
if data[key] == None:
|
||||||
|
if key in self.data:
|
||||||
|
del self.data[key]
|
||||||
|
else:
|
||||||
self.data[key] = data[key]
|
self.data[key] = data[key]
|
||||||
return self.save()
|
return self.save()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue