Commit 04858648 authored by Yusei Tahara's avatar Yusei Tahara

Prevent KeyError if type information does not exist in type tool.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18230 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5f70f941
...@@ -101,7 +101,11 @@ class PropertyTranslationDomainGetter(Method): ...@@ -101,7 +101,11 @@ class PropertyTranslationDomainGetter(Method):
ptype_domain = None ptype_domain = None
ptype = instance.getPortalType() ptype = instance.getPortalType()
ptypes_tool = instance.getPortalObject()['portal_types'] ptypes_tool = instance.getPortalObject()['portal_types']
domain_dict = ptypes_tool[ptype].getPropertyTranslationDomainDict() typeinfo = ptypes_tool.getTypeInfo(ptype)
if typeinfo is None:
ptype_domain = ''
else:
domain_dict = typeinfo.getPropertyTranslationDomainDict()
domain = domain_dict.get(self._original_key) domain = domain_dict.get(self._original_key)
if domain is None: if domain is None:
ptype_domain = '' ptype_domain = ''
......
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