Commit c1fbdd39 authored by Yoshinori Okuji's avatar Yoshinori Okuji

If callable, try to call obj.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@958 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9926b18f
......@@ -200,6 +200,11 @@ if HAS_ZODB_RESOURCE_HANDLER:
obj = restrictedTraverse(self.context,path,getSecurityManager())
# check type and e.g. call object if script ...
if callable(obj):
try:
obj = obj()
except:
pass
## for OFS.Image-like objects
if hasattr(obj,'_original'):
......@@ -224,6 +229,11 @@ else:
obj = restrictedTraverse(self.context,path,getSecurityManager())
# check type and e.g. call object if script ...
if callable(obj):
try:
obj = obj()
except:
pass
## for OFS.Image-like objects
if hasattr(obj,'_original'):
......
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