Commit 6194939d authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fixup! ZODB Components: Export only the last Workflow History.

parent 21c57f66
......@@ -538,9 +538,12 @@ class BaseTemplateItem(Implicit, Persistent):
bta.importFiles(item=self)
def _removeAllButLastWorkflowHistory(self, obj):
for workflow_id in obj.workflow_history.keys():
obj.workflow_history[workflow_id] = WorkflowHistoryList(
obj.workflow_history[workflow_id][-1])
workflow_history = getattr(obj, 'workflow_history', None)
if workflow_history is None:
return
for workflow_id in workflow_history.keys():
workflow_history[workflow_id] = WorkflowHistoryList(
[workflow_history[workflow_id][-1]])
def removeProperties(self,
obj,
......
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