diff options
| author | niv-openerp <nicolas.vanhoren@openerp.com> | 2013-09-13 12:24:44 +0200 |
|---|---|---|
| committer | niv-openerp <nicolas.vanhoren@openerp.com> | 2013-09-13 12:24:44 +0200 |
| commit | 53b7baf1ce8a3143648e9d987899b03e0b36dfea (patch) | |
| tree | 0086ea9f3fedde6c9643c382d7df47575950609b /addons/web/http.py | |
| parent | 2f9980881b2533195e8797f678d1038cb95a5ac4 (diff) | |
[FIX] fixed some problems related to magic guess of db, now only tries to perform the magic guess when the --dbfilter argument is specified
bzr revid: nicolas.vanhoren@openerp.com-20130913102444-u30boym4nklatnf1
Diffstat (limited to 'addons/web/http.py')
| -rw-r--r-- | addons/web/http.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/addons/web/http.py b/addons/web/http.py index ccd1125fa22..c8fabafd594 100644 --- a/addons/web/http.py +++ b/addons/web/http.py @@ -1084,17 +1084,14 @@ def db_monodb(httprequest=None): dbs = db_list(True, httprequest) - # 1 try the db already in the session + # try the db already in the session db_session = httprequest.session.db if db_session in dbs: return db_session - # 2 if there is only one db in the db filters, take it - if len(dbs) == 1: - return dbs[0] - - # 3 if there are multiple dbs, take the first one only if we can list them - if len(dbs) > 1 and config['list_db']: + # 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: return dbs[0] return None |
