From 6ca4edf742be9563a5e07b96b1d243c8a506897c Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 14 Feb 2012 16:08:36 +0530 Subject: [PATCH] descriptions should be empty not None --- pandora/item/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index 6164c327..e8776192 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -222,8 +222,11 @@ class Item(models.Model): key = '%sdescription' % k if key in data: value = data.get(k, self.get(k, '')) + description = data.pop(key) + if not description: + description = '' d, created = Description.objects.get_or_create(key=k, value=value) - d.description = data.pop(key) + d.description = description d.save() for key in data: if data[key] == None: