From c234d8547d6f159ef62dac6cbc5c8c3ad1e66979 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 6 Feb 2014 11:51:41 +0100 Subject: [PATCH] [FIX] _(): avoid useless warning where translating string without a cursor bzr revid: chs@openerp.com-20140206105141-7e8bv8ordqqsswh7 --- openerp/tools/translate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/tools/translate.py b/openerp/tools/translate.py index c7933c31f61..4dc49903730 100644 --- a/openerp/tools/translate.py +++ b/openerp/tools/translate.py @@ -172,7 +172,7 @@ class GettextAlias(object): cr = getattr(s, 'cr', None) if not cr and allow_create: db = self._get_db() - if db: + if db is not None: cr = db.cursor() is_new_cr = True return cr, is_new_cr