From d2ff946c28aa56862636027c15f552fdf4ed3d90 Mon Sep 17 00:00:00 2001
From: Alexandre Boeglin <alex@nexedi.com>
Date: Wed, 24 Nov 2004 14:37:46 +0000
Subject: [PATCH] portal_workflow.doActionFor() raises an exception if the
 transition does not exist. Catched.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1923 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/CopySupport.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/product/ERP5Type/CopySupport.py b/product/ERP5Type/CopySupport.py
index 9181df87a4..5cfcda68b3 100755
--- a/product/ERP5Type/CopySupport.py
+++ b/product/ERP5Type/CopySupport.py
@@ -196,7 +196,10 @@ class CopyContainer:
         break
     else :
       source_item = '/'.join(copied_item_list[0])
-    pw.doActionFor(self_base, 'copy', wf_id='edit_workflow', comment='Object copied from %s' % source_item)
+    try :
+      pw.doActionFor(self_base, 'copy', wf_id='edit_workflow', comment='Object copied from %s' % source_item)
+    except :
+      LOG('manage_afterPaste :', 0, '''Impossible to call transition 'copy' of 'edit_workflow' for %s''' % self.getRelativeUrl())
 
     self.__recurse('manage_afterClone', item)
     # Reindex object
-- 
2.30.9