Commit e15bc0f6 authored by Romain Courteaud's avatar Romain Courteaud

Use getProperty instead of getattr.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15224 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cfcd1fac
No related merge requests found
......@@ -1835,16 +1835,23 @@ class BasicGroup:
# previously recovered method
block_begin = None
block_end = None
if object_property_begin is not None:
block_begin = \
getattr(activity_content.getObject(),object_property_begin)
else:
block_begin = None
if object_property_end is not None:
block_end = getattr(activity_content.getObject(),object_property_end)
else:
block_end = None
obj = activity_content.getObject()
_marker = []
try:
block_begin = obj.getProperty(object_property_begin, _marker)
if block_begin is _marker:
raise AttributeError, object_property_begin
except AttributeError:
block_begin = getattr(obj, object_property_begin, None)
try:
block_end = obj.getProperty(object_property_end, _marker)
if block_end is _marker:
raise AttributeError, object_property_end
except AttributeError:
block_end = getattr(obj, object_property_end, None)
# handling case where activity bound is not defined
if block_begin is None:
......
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