Commit 4ee50a57 authored by Sebastien Robin's avatar Sebastien Robin

Revert "ERP5: remove duplicated code when getting transformation from a resource"

This reverts commit fba5767e.

Sorry, I went too quickly, there was difference between self and context
parent fba5767e
...@@ -298,6 +298,10 @@ class Resource(XMLObject, XMLMatrix, VariatedMixin): ...@@ -298,6 +298,10 @@ class Resource(XMLObject, XMLMatrix, VariatedMixin):
return transformation_list[0].getObject() return transformation_list[0].getObject()
return None return None
method = context._getTypeBasedMethod('getDefaultTransformationValue')
if method is not None:
return method(context)
transformation_list = self.portal_domains.searchPredicateList(context, transformation_list = self.portal_domains.searchPredicateList(context,
portal_type=self.getPortalObject().getPortalTransformationTypeList(), portal_type=self.getPortalObject().getPortalTransformationTypeList(),
limit=1) limit=1)
......
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