Commit 8f4e8ae5 authored by Nicolas Dumazet's avatar Nicolas Dumazet

more robust check for dynamic erp5 modules


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38665 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3cb69cdf
......@@ -180,7 +180,7 @@ class TypesTool(TypeProvider):
"""
portal_type = None
if isinstance(context, type):
if 'erp5' in context.__module__:
if context.__module__ in ('erp5.portal_type', 'erp5.temp_portal_type'):
portal_type = context.__name__
else:
portal_type = getattr(context, 'portal_type', None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment