Commit f90485b5 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Make the portal parameter optional for compatibility.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20890 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d20df843
......@@ -999,10 +999,13 @@ def setDefaultConstructor(klass):
document_constructor.__name__ = document_constructor_name
def createExpressionContext(object, portal):
def createExpressionContext(object, portal=None):
"""
Return a context used for evaluating a TALES expression.
"""
if portal is None and object is not None:
portal = object.getPortalObject()
if object is None or getattr(object, 'aq_base', None) is None:
folder = portal
else:
......
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