From 6199897131cc522afe875d6d41bdb0231df0bdd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Sat, 12 Aug 2006 16:12:50 +0000 Subject: [PATCH] r9074 had some side effects with Interaction Workflows which doesn't reset workflow_history if it's None; so it's safer to del the attribute. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9173 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/BusinessTemplate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py index e76cc106fe..56a4f44a80 100644 --- a/product/ERP5/Document/BusinessTemplate.py +++ b/product/ERP5/Document/BusinessTemplate.py @@ -378,7 +378,10 @@ class BaseTemplateItem(Implicit, Persistent): if hasattr(aq_base(obj), '_filepath'): obj._filepath = None if hasattr(aq_base(obj), 'workflow_history'): - obj.workflow_history = None + if hasattr(obj.__class__, 'workflow_history'): + obj.workflow_history = None + else: + del obj.workflow_history if getattr(obj, 'meta_type', None) == 'Script (Python)': if hasattr(aq_base(obj), '_code'): obj._code = None -- 2.30.9