slightly bad hack to deal with orphaned content-types
This commit is contained in:
parent
d86dff8c7b
commit
f3c1d0dc8e
|
@ -20,8 +20,11 @@ def splitSearch(string):
|
|||
#i see the point of this function, but please clean it up: refer to 'except MultipleObjectsReturned' to see why this is here.
|
||||
def get_real_ctype(module_name):
|
||||
for c in ContentType.objects.filter(model=module_name):
|
||||
try:
|
||||
if c.model_class().is_itf_model == True:
|
||||
return c
|
||||
except:
|
||||
pass
|
||||
return None
|
||||
|
||||
class ItfModel(models.Model):
|
||||
|
|
Loading…
Reference in New Issue
Block a user