[IMP] monodb selects first database if only one match. Even if db-filter was not provided

bzr revid: fme@openerp.com-20140508083921-pu2zte8fq69wvo8o
This commit is contained in:
Fabien Meghazi 2014-05-08 10:39:21 +02:00
parent 319ed3dede
commit e9572c56b3
1 changed files with 2 additions and 3 deletions

View File

@ -1285,9 +1285,8 @@ def db_monodb(httprequest=None):
if db_session in dbs:
return db_session
# if dbfilters was specified when launching the server and there is
# only one possible db, we take that one
if openerp.tools.config['dbfilter'] != ".*" and len(dbs) == 1:
# if there is only one possible db, we take that one
if len(dbs) == 1:
return dbs[0]
return None