From 67bb35b2eb0e9cafcfecc0cd9449a3b502c605e5 Mon Sep 17 00:00:00 2001 From: Sanj Date: Thu, 8 Dec 2011 15:08:35 +0530 Subject: [PATCH] try fix main_image bug --- itf/app/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/itf/app/models.py b/itf/app/models.py index d8ad9af..2ecb0c3 100755 --- a/itf/app/models.py +++ b/itf/app/models.py @@ -88,6 +88,8 @@ class ItfModel(models.Model): def get_main_image(self): + if not self.__hasattr__('main_image'): + return {'thumb': None} #FIXME main_image = self.main_image if type(main_image).__name__ == 'function': main_image = main_image()