Commit 43afbc67 authored by Łukasz Nowak's avatar Łukasz Nowak

- do not fail in case of problems with getting explanation value, treat it...

- do not fail in case of problems with getting explanation value, treat it that there is no explanation's activity

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25861 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5495368b
...@@ -166,10 +166,15 @@ else:\n ...@@ -166,10 +166,15 @@ else:\n
if exception_portal_type_list is not None and \\\n if exception_portal_type_list is not None and \\\n
actual_object.getPortalType() in exception_portal_type_list:\n actual_object.getPortalType() in exception_portal_type_list:\n
continue\n continue\n
explanation_value = None\n
try:\n
explanation_value = actual_object.getExplanationValue()\n
except AttributeError:\n
pass\n
# There is already activity changing the state\n # There is already activity changing the state\n
if actual_object.hasActivity() \\\n if actual_object.hasActivity() \\\n
or (getattr(actual_object, \'getExplanationValue\', None) is not None \\\n or (explanation_value is not None \\\n
and actual_object.getExplanationValue().hasActivity()):\n and explanation_value.hasActivity()):\n
continue\n continue\n
if property_override_method_id is None:\n if property_override_method_id is None:\n
reference_dict = {}\n reference_dict = {}\n
...@@ -335,8 +340,10 @@ return active_result\n ...@@ -335,8 +340,10 @@ return active_result\n
<string>message</string> <string>message</string>
<string>actual_object</string> <string>actual_object</string>
<string>KeyError</string> <string>KeyError</string>
<string>getattr</string> <string>explanation_value</string>
<string>AttributeError</string>
<string>reference_dict</string> <string>reference_dict</string>
<string>getattr</string>
<string>attribute_id</string> <string>attribute_id</string>
<string>reference_value</string> <string>reference_value</string>
<string>catalog_value</string> <string>catalog_value</string>
......
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