From 88e609da863abec44fe02be4dd9f65649bfd775b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20G=C3=B3rny?= <bartek@gorny.edu.pl> Date: Mon, 11 Jun 2007 19:35:20 +0000 Subject: [PATCH] Fixed email address lookup so that it conforms to specs in testIngestion suite, test #11 git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14783 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../portal_skins/erp5_dms/Document_ingestEmail.xml | 10 +++++----- bt5/erp5_dms/bt/revision | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Document_ingestEmail.xml b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Document_ingestEmail.xml index 3c6ac40c46..9de4e05c8d 100644 --- a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Document_ingestEmail.xml +++ b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Document_ingestEmail.xml @@ -89,17 +89,17 @@ if sender_email is None:\n return msg\n \n # find sender in ERP5\n -found_persons = context.portal_catalog(portal_type=\'Person\', reference=sender_email)\n -if len(found_persons) == 0:\n +found_email_list = context.portal_catalog(portal_type=\'Email\', url_string=sender_email)\n +if len(found_email_list) == 0:\n msg = \'[DMS] You are not in user database\'\n context.log(msg)\n return msg\n -if len(found_persons) > 1:\n +if len(found_email_list) > 1:\n msg = \'[DMS] Your email address has multiple entries\'\n context.log(msg)\n return msg\n \n -person = found_persons[0]\n +person = found_email_list[0].getParentValue()\n \n # get mail properties out of mail body\n mailprops = context.Document_getPropertyDictFromMail(theMail[\'body\'])\n @@ -193,7 +193,7 @@ except Exception, e:\n <string>sender_email</string> <string>None</string> <string>msg</string> - <string>found_persons</string> + <string>found_email_list</string> <string>len</string> <string>person</string> <string>mailprops</string> diff --git a/bt5/erp5_dms/bt/revision b/bt5/erp5_dms/bt/revision index 5c0d33d75a..26f252bdd8 100644 --- a/bt5/erp5_dms/bt/revision +++ b/bt5/erp5_dms/bt/revision @@ -1 +1 @@ -647 \ No newline at end of file +649 \ No newline at end of file -- 2.30.9