This commit is contained in:
Johnson Chetty 2013-09-23 17:21:42 +02:00
commit 5e9c28014f

View File

@ -124,10 +124,11 @@ class ItfModel(models.Model):
return d return d
def get_content_type(self): def get_content_type(self):
for c in ContentType.objects.filter(model=self.__class__._meta.module_name): return ContentType.objects.get_for_model(self.__class__)
if c.model_class() is not None and isinstance(c.model_class(), ItfModel): # for c in ContentType.objects.filter(model=self.__class__._meta.module_name):
return c # if c.model_class() is not None and isinstance(c.model_class(), ItfModel):
raise # return c
# raise
def get_gallery_image(self): def get_gallery_image(self):
from mediagallery.models import Photo from mediagallery.models import Photo