Commit 471bd309 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Resource: getDefaultTransformationValue dynamically get Trasnsformation portal_types

parent 4d6fea67
...@@ -289,7 +289,7 @@ class Resource(XMLObject, XMLMatrix, VariatedMixin): ...@@ -289,7 +289,7 @@ class Resource(XMLObject, XMLMatrix, VariatedMixin):
if context is None: if context is None:
transformation_list = self.portal_catalog( transformation_list = self.portal_catalog(
portal_type="Transformation", portal_type=self.getPortalObject().getPortalTransformationTypeList(),
default_resource_uid=self.getUid(), default_resource_uid=self.getUid(),
sort_on=[('version', 'descending')], sort_on=[('version', 'descending')],
limit=1 limit=1
...@@ -303,7 +303,7 @@ class Resource(XMLObject, XMLMatrix, VariatedMixin): ...@@ -303,7 +303,7 @@ class Resource(XMLObject, XMLMatrix, VariatedMixin):
return method(context) return method(context)
transformation_list = self.portal_domains.searchPredicateList(context, transformation_list = self.portal_domains.searchPredicateList(context,
portal_type="Transformation", portal_type=self.getPortalObject().getPortalTransformationTypeList(),
limit=1) limit=1)
if len(transformation_list) > 0: if len(transformation_list) > 0:
......
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