[Erp5-report] r34067 nicolas - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Mar 24 18:30:20 CET 2010
Author: nicolas
Date: Wed Mar 24 18:30:18 2010
New Revision: 34067
URL: http://svn.erp5.org?rev=34067&view=rev
Log:
Be more tolerant to access object which can be allready deleted
if its parent is removed before.
Modified:
erp5/trunk/products/ERP5/Document/BusinessTemplate.py
Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=34067&r1=34066&r2=34067&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Wed Mar 24 18:30:18 2010
@@ -1137,7 +1137,10 @@
if recursive_path in update_dict:
action = update_dict[recursive_path]
if action in ('remove', 'save_and_remove'):
- document = portal.restrictedTraverse(recursive_path)
+ document = portal.restrictedTraverse(recursive_path, None)
+ if document is None:
+ # It happens if the parent of target path is removed before
+ continue
if getattr(aq_base(document), 'getParentValue', None) is not None:
# regular ERP5 object
parent = document.getParentValue()
More information about the Erp5-report
mailing list