From 8279905d0df608b578bbd69d564ebb88524adafd Mon Sep 17 00:00:00 2001 From: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Mon, 14 Dec 2009 14:36:11 +0000 Subject: [PATCH] do not raise an exception if solver is not configurable. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31283 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_simulation/SolverDecision_getConfigurationUrl.xml | 7 ++++++- bt5/erp5_simulation/bt/revision | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/SolverDecision_getConfigurationUrl.xml b/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/SolverDecision_getConfigurationUrl.xml index 9a1cb462cb..0fe0dba390 100644 --- a/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/SolverDecision_getConfigurationUrl.xml +++ b/bt5/erp5_simulation/SkinTemplateItem/portal_skins/erp5_simulation/SolverDecision_getConfigurationUrl.xml @@ -63,7 +63,11 @@ if not solver:\n \n solver = context.getSolverValue()\n \n -return "%s/%s" % (context.absolute_url(), solver.getConfigurationFormId())\n +try:\n + return "%s/%s" % (context.absolute_url(), solver.getConfigurationFormId())\n +except AttributeError:\n + # the solver is not configurable.\n + return False\n </string> </value> </item> <item> @@ -104,6 +108,7 @@ return "%s/%s" % (context.absolute_url(), solver.getConfigurationFormId())\n <string>context</string> <string>solver</string> <string>False</string> + <string>AttributeError</string> </tuple> </value> </item> diff --git a/bt5/erp5_simulation/bt/revision b/bt5/erp5_simulation/bt/revision index b393560759..cabf43b5dd 100644 --- a/bt5/erp5_simulation/bt/revision +++ b/bt5/erp5_simulation/bt/revision @@ -1 +1 @@ -23 \ No newline at end of file +24 \ No newline at end of file -- 2.30.9