Commit e45b3fde authored by Yoshinori Okuji's avatar Yoshinori Okuji

Do not fail even if a translation domain is not defined.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8149 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bbea0871
......@@ -102,9 +102,12 @@ class PropertyTranslationDomainGetter(Method):
ptype_domain = None
ptype = instance.getPortalType()
ptypes_tool = instance.getPortalObject()['portal_types']
ptype_domain = ptypes_tool[ptype]\
.getPropertyTranslationDomainDict()\
[self._original_key].getDomainName()
domain_dict = ptypes_tool[ptype].getPropertyTranslationDomainDict()
domain = domain_dict.get(self._original_key)
if domain is None:
ptype_domain = ''
else:
ptype_domain = domain.getDomainName()
if ptype_domain is '' and default is not None:
# then get the default property defined on property sheet
value = default
......
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