From 7f9f80d1f2c0ead1be60f7b4cabbfd3b622f678e Mon Sep 17 00:00:00 2001
From: Ivan Tyagov <ivan@nexedi.com>
Date: Tue, 19 Jun 2007 11:54:18 +0000
Subject: [PATCH] Fix typo. Allow passing an error message from caller script.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14874 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_skins/erp5_dms/Document_notifyByEmail.xml          | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Document_notifyByEmail.xml b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Document_notifyByEmail.xml
index a898865eff..c7acdb4700 100644
--- a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Document_notifyByEmail.xml
+++ b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Document_notifyByEmail.xml
@@ -103,7 +103,7 @@ if event in (\'ingestion_success\',):\n
     consistency_result = [x for x in consistency_result if x[1] == \'DocumentCoordinatesConstraint inconsistency\']\n
     isObjectConsistent = len(consistency_result) == 0\n
   if not isObjectConsistent:\n
-    error_msg = \'<br/>\'.join(str(c[3]) for x in consistency_result)\n
+    error_msg = \'<br/>\'.join(str(x[3]) for x in consistency_result)\n
     subject_template =  \'[DMS] Failure ingestion %(name)s\'\n
     email_template = """Your document "%(name)s" was not successfuly ingested.\n
   \n
@@ -121,7 +121,7 @@ if event in (\'ingestion_success\',):\n
 click here: %(url)s/view to proceed with your work."""\n
 elif event in (\'ingestion_failure\',):\n
   # there was an error during ingestion process, inform user to try again\n
-  error_msg = \'Failure during ingestion.\'\n
+  error_msg = kw.get(\'message\', \'Failure during ingestion.\') \n
   subject_template =  \'[DMS] Unsuccessful ingestion\'\n
   email_template = """Your document was not successfuly ingested.\n
   \n
-- 
2.30.9