try and fix ctypes issue

This commit is contained in:
Sanjay B 2013-09-23 20:24:19 +05:30
parent c7bb5c5890
commit 9a80c9f5b9
2 changed files with 1 additions and 2 deletions

View File

@ -125,7 +125,7 @@ class ItfModel(models.Model):
def get_content_type(self):
for c in ContentType.objects.filter(model=self.__class__._meta.module_name):
if c.model_class() is not None:
if c.model_class() is not None and isinstance(c.model_class(), ItfModel):
return c
raise

View File

@ -34,7 +34,6 @@
<p>
{% for result in page.object_list %}
<a href="{{ result.object.get_absolute_url }}&amp;search={{ query }}">{{ result.object }}</a>
{{ result.text|truncatewords:60|markdown|striptags }}