From 21fd3f160d3dd091152981a25f3fc942d879eff2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Tue, 5 Jan 2010 10:14:57 +0000
Subject: [PATCH] empty files should not be in uploaded state, they should
 remain in empty state.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31570 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../document_interaction_workflow/scripts/upload.xml           | 3 ++-
 bt5/erp5_dms/bt/revision                                       | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/scripts/upload.xml b/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/scripts/upload.xml
index 174d4187ce..d6d516a808 100644
--- a/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/scripts/upload.xml
+++ b/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_interaction_workflow/scripts/upload.xml
@@ -54,7 +54,8 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>document = state_change[\'object\']\n
-document.uploadFile()\n
+if document.hasBaseData():\n
+  document.uploadFile()\n
 \n
 # do not activate conversion if the object is in portal_contributions\n
 # because it will be gone from there in a second\n
diff --git a/bt5/erp5_dms/bt/revision b/bt5/erp5_dms/bt/revision
index f88337fb7a..01ff2b71e6 100644
--- a/bt5/erp5_dms/bt/revision
+++ b/bt5/erp5_dms/bt/revision
@@ -1 +1 @@
-1050
\ No newline at end of file
+1051
\ No newline at end of file
-- 
2.30.9