From 43afbc67eebf6c393ca34c67633d71ecf8c8596d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com> Date: Wed, 4 Mar 2009 13:16:02 +0000 Subject: [PATCH] - do not fail in case of problems with getting explanation value, treat it that there is no explanation's activity git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25861 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../ERP5Site_checkCatalogTable.xml | 13 ++++++++++--- bt5/erp5_administration/bt/revision | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_checkCatalogTable.xml b/bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_checkCatalogTable.xml index f4850a91ec..2d3954a97b 100644 --- a/bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_checkCatalogTable.xml +++ b/bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/ERP5Site_checkCatalogTable.xml @@ -166,10 +166,15 @@ else:\n if exception_portal_type_list is not None and \\\n actual_object.getPortalType() in exception_portal_type_list:\n continue\n + explanation_value = None\n + try:\n + explanation_value = actual_object.getExplanationValue()\n + except AttributeError:\n + pass\n # There is already activity changing the state\n if actual_object.hasActivity() \\\n - or (getattr(actual_object, \'getExplanationValue\', None) is not None \\\n - and actual_object.getExplanationValue().hasActivity()):\n + or (explanation_value is not None \\\n + and explanation_value.hasActivity()):\n continue\n if property_override_method_id is None:\n reference_dict = {}\n @@ -335,8 +340,10 @@ return active_result\n <string>message</string> <string>actual_object</string> <string>KeyError</string> - <string>getattr</string> + <string>explanation_value</string> + <string>AttributeError</string> <string>reference_dict</string> + <string>getattr</string> <string>attribute_id</string> <string>reference_value</string> <string>catalog_value</string> diff --git a/bt5/erp5_administration/bt/revision b/bt5/erp5_administration/bt/revision index 920a139664..7d37386284 100644 --- a/bt5/erp5_administration/bt/revision +++ b/bt5/erp5_administration/bt/revision @@ -1 +1 @@ -43 +45 \ No newline at end of file -- 2.30.9