From 15c926c266d87bbf87a7c016bbc77a9206401cfb Mon Sep 17 00:00:00 2001 From: Sanjay B Date: Mon, 23 Sep 2013 20:33:55 +0530 Subject: [PATCH] try fixing ctypes --- itf/app/models.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/itf/app/models.py b/itf/app/models.py index 9aa3a71..a221fc7 100755 --- a/itf/app/models.py +++ b/itf/app/models.py @@ -124,10 +124,11 @@ class ItfModel(models.Model): return d def get_content_type(self): - for c in ContentType.objects.filter(model=self.__class__._meta.module_name): - if c.model_class() is not None and isinstance(c.model_class(), ItfModel): - return c - raise + return ContentType.objects.get_for_model(self.__class__) + # for c in ContentType.objects.filter(model=self.__class__._meta.module_name): + # if c.model_class() is not None and isinstance(c.model_class(), ItfModel): + # return c + # raise def get_gallery_image(self): from mediagallery.models import Photo