From 32e28ccd63ac993e72d439dd966aa3f479ef79c6 Mon Sep 17 00:00:00 2001 From: Ian Wilson Date: Fri, 15 Feb 2013 14:06:13 -0800 Subject: [PATCH] Use new search API. The search method returns records now so browse is no longer needed. issue3004 review672002 --- trytond/ir/action.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trytond/ir/action.py b/trytond/ir/action.py index a2d9968843..4a7694643b 100644 --- a/trytond/ir/action.py +++ b/trytond/ir/action.py @@ -72,11 +72,11 @@ class Action(ModelSQL, ModelView): 'ir.action.url', ): Action = pool.get(action_type) - action_id2 = Action.search([ + actions = Action.search([ ('id', '=', action_id), ]) - if action_id2: - action = Action.browse(action_id2[0]) + if actions: + action, = actions return action.action.id @classmethod