From 099c8671c406582edc5c8693d5aa5177d0690883 Mon Sep 17 00:00:00 2001 From: Sanj Date: Mon, 7 Mar 2011 03:16:41 +0530 Subject: [PATCH] dont die if story doesn't have an image --- itf/bestpractices/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/itf/bestpractices/models.py b/itf/bestpractices/models.py index a295875..ba10070 100644 --- a/itf/bestpractices/models.py +++ b/itf/bestpractices/models.py @@ -80,7 +80,7 @@ class BestPracticeStory(models.Model): def get_dict(self): return { 'text': self.text, - 'image': self.image.url, + 'image': self.image.url if self.image != None else '' }