Commit af516cff authored by Jérome Perrin's avatar Jérome Perrin

Import evaluateTales from Base instead of copy/paste

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7148 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3ba47492
......@@ -26,13 +26,10 @@
#
##############################################################################
from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Method
from Base import func_code, type_definition, list_types,\
ATTRIBUTE_PREFIX, Method, evaluateTales
from TypeDefinition import asList, identity
import Base
from Products.CMFCore.Expression import Expression
from Products.ERP5Type.Utils import createExpressionContext
from Products.ERP5Type.Cache import CachingMethod
from Products.ERP5Type.PsycoWrapper import psyco
from zLOG import LOG
......@@ -206,14 +203,6 @@ class SetSetter(Method):
method(*args, **kw)
if self._reindex: instance.reindexObject()
def _evaluateTales(instance=None, value=None):
expression = Expression(value)
econtext = createExpressionContext(instance)
return expression(econtext)
evaluateTales = CachingMethod(_evaluateTales, id = 'evaluateTales', cache_duration=300)
class DefaultGetter(Method):
"""
Gets the first item of a list
......
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