minor, exception import:
This commit is contained in:
parent
d2bbe35156
commit
4f4e2ea16c
|
@ -46,7 +46,7 @@ class ItfModel(models.Model):
|
||||||
def get_tab(self):
|
def get_tab(self):
|
||||||
try:
|
try:
|
||||||
ctype = ContentType.objects.get(model=self.__class__._meta.module_name)
|
ctype = ContentType.objects.get(model=self.__class__._meta.module_name)
|
||||||
except MultipleObectsReturned: #FUCKING way ugly hack to get clashing model ctype names with django internal models working (get_real_ctypes simply checks, if there are multiple content objects with the same 'module_name', which one is_itf_model, and returns that).
|
except:#FIXME: ideally catch only MultipleObjectsReturned (figure out where to import that from :/ ) #FUCKING way ugly hack to get clashing model ctype names with django internal models working (get_real_ctypes simply checks, if there are multiple content objects with the same 'module_name', which one is_itf_model, and returns that).
|
||||||
ctype = get_real_ctype(self.__class__m.meta.module_name)
|
ctype = get_real_ctype(self.__class__m.meta.module_name)
|
||||||
|
|
||||||
modelextra = ModelExtra.objects.filter(model=ctype)[0]
|
modelextra = ModelExtra.objects.filter(model=ctype)[0]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user