Commit fe036d96 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Rename _convertValueToTalesExpression to _getExpressionFromString in

StandardProperty and AcquiredProperty documents


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43233 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dd23322c
......@@ -130,11 +130,10 @@ class AcquiredProperty(StandardProperty):
filesystem_property_dict = \
StandardProperty.exportToFilesystemDefinition(self)
acquisition_portal_type_value = self._convertValueToTalesExpression(
acquisition_portal_type_value = self._getExpressionFromString(
self.getAcquisitionPortalType())
portal_type_value = self._convertValueToTalesExpression(
self.getContentPortalType())
portal_type_value = self._getExpressionFromString(self.getContentPortalType())
filesystem_property_dict.update(
{'acquisition_base_category': self.getAcquisitionBaseCategoryList(),
......
......@@ -114,15 +114,14 @@ class StandardProperty(XMLObject):
'string')
@staticmethod
def _convertValueToTalesExpression(value):
def _getExpressionFromString(expression_string):
"""
Convert a string value to a TALES expression for attributes listed
in '_expression_attribute_tuple'
Get a TALES Expression instance from a string value
"""
if value is None:
if expression_string is None:
return None
return Expression(value)
return Expression(expression_string)
security.declareProtected(Permissions.AccessContentsInformation,
'exportToFilesystemDefinition')
......@@ -130,8 +129,7 @@ class StandardProperty(XMLObject):
"""
Return the filesystem definition of this ZODB property
"""
property_default_value = self._convertValueToTalesExpression(
self.getPropertyDefault())
property_default_value = self._getExpressionFromString(self.getPropertyDefault())
return {'id': self.getReference(),
'description': self.getDescription(),
......
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