[FIX] database get_list use wsgi hostname

bzr revid: al@openerp.com-20120221185853-6qjxwktk7pnehz9w
This commit is contained in:
Antony Lesuisse 2012-02-21 19:58:53 +01:00
parent 15bf79811d
commit a0493e2e48
1 changed files with 1 additions and 1 deletions

View File

@ -352,7 +352,7 @@ class Database(openerpweb.Controller):
def get_list(self, req):
proxy = req.session.proxy("db")
dbs = proxy.list()
h = req.httprequest.headers['Host'].split(':')[0]
h = req.httprequest.environ['HTTP_HOST'].split(':')[0]
d = h.split('.')[0]
r = req.config.dbfilter.replace('%h', h).replace('%d', d)
dbs = [i for i in dbs if re.match(r, i)]