[FIX] _(): avoid useless warning where translating string without a cursor

bzr revid: chs@openerp.com-20140206105141-7e8bv8ordqqsswh7
This commit is contained in:
Christophe Simonis 2014-02-06 11:51:41 +01:00
parent b75c52f3ed
commit c234d8547d
1 changed files with 1 additions and 1 deletions

View File

@ -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