[FIX] database get_list use wsgi hostname

bzr revid: al@openerp.com-20120221185739-7utcld4kcnf39fg5
This commit is contained in:
Antony Lesuisse
2012-02-21 19:57:39 +01:00
parent 688e788cef
commit bfee2b7ae2
+1 -1
View File
@@ -351,7 +351,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)]