dont die if story doesn't have an image

This commit is contained in:
Sanj 2011-03-07 03:16:41 +05:30
parent bf9bf130c6
commit 099c8671c4

View File

@ -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 ''
}