try fix main_image bug

This commit is contained in:
Sanj 2011-12-08 15:08:35 +05:30
parent f55a785b90
commit 67bb35b2eb

View File

@ -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()