try fixing ctypes
This commit is contained in:
parent
9a80c9f5b9
commit
15c926c266
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user