Commit 61998971 authored by Jérome Perrin's avatar Jérome Perrin

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
parent 8c518e50
...@@ -378,7 +378,10 @@ class BaseTemplateItem(Implicit, Persistent): ...@@ -378,7 +378,10 @@ class BaseTemplateItem(Implicit, Persistent):
if hasattr(aq_base(obj), '_filepath'): if hasattr(aq_base(obj), '_filepath'):
obj._filepath = None obj._filepath = None
if hasattr(aq_base(obj), 'workflow_history'): if hasattr(aq_base(obj), 'workflow_history'):
if hasattr(obj.__class__, 'workflow_history'):
obj.workflow_history = None obj.workflow_history = None
else:
del obj.workflow_history
if getattr(obj, 'meta_type', None) == 'Script (Python)': if getattr(obj, 'meta_type', None) == 'Script (Python)':
if hasattr(aq_base(obj), '_code'): if hasattr(aq_base(obj), '_code'):
obj._code = None obj._code = 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