From 9f2da19c35c329785273463565a0ba82683837e7 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Mon, 20 Nov 2006 14:50:00 +0000 Subject: [PATCH] remove the bad hasattr in the checkConstistency script git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11386 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../scripts/validateConsistency.xml | 19 +++++++++---------- bt5/erp5_banking_check/bt/revision | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateConsistency.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateConsistency.xml index ce345878ab..43df25fe5a 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateConsistency.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateConsistency.xml @@ -84,15 +84,14 @@ else:\n site = None\n # try to guess site from document if source is defined\n # XXX useful for unit test\n - if hasattr(transaction, \'source\'):\n - site = transaction.getSourceValue()\n - while True:\n - if not hasattr(site, \'getVaultTypeList\'):\n - msg = Message(domain = \'ui\', message = \'The site value is misconfigured; report this to system administrators.\')\n - raise ValidationFailed, (msg,)\n - if \'site\' in site.getVaultTypeList():\n - break\n - site = site.getParentValue()\n + site = transaction.getSourceValue()\n + while True:\n + if not hasattr(site, \'getVaultTypeList\'):\n + msg = Message(domain = \'ui\', message = \'The site value is misconfigured; report this to system administrators.\')\n + raise ValidationFailed, (msg,)\n + if \'site\' in site.getVaultTypeList():\n + break\n + site = site.getParentValue()\n \n if site is None:\n msg = Message(domain = \'ui\', message = \'Impossible to determine site for the transaction.\')\n @@ -235,8 +234,8 @@ else:\n <string>site</string> <string>len</string> <string>None</string> - <string>hasattr</string> <string>True</string> + <string>hasattr</string> <string>msg</string> <string>date</string> <string>current_date</string> diff --git a/bt5/erp5_banking_check/bt/revision b/bt5/erp5_banking_check/bt/revision index 7c6ba0fe18..4800c7da68 100644 --- a/bt5/erp5_banking_check/bt/revision +++ b/bt5/erp5_banking_check/bt/revision @@ -1 +1 @@ -55 \ No newline at end of file +58 \ No newline at end of file -- 2.30.9