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