projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17f1992
)
[FIX] Don't crash if no host specified
author
Fabien Meghazi
<fme@openerp.com>
Thu, 20 Feb 2014 13:29:22 +0000
(14:29 +0100)
committer
Fabien Meghazi
<fme@openerp.com>
Thu, 20 Feb 2014 13:29:22 +0000
(14:29 +0100)
bzr revid: fme@openerp.com-
20140220132922
-wax6e05u8x06lepu
openerp/http.py
patch
|
blob
|
history
diff --git
a/openerp/http.py
b/openerp/http.py
index
507afc7
..
90dbb6b
100644
(file)
--- a/
openerp/http.py
+++ b/
openerp/http.py
@@
-1200,7
+1200,7
@@
def db_list(force=False, httprequest=None):
def db_filter(dbs, httprequest=None):
httprequest = httprequest or request.httprequest
- h = httprequest.environ['HTTP_HOST'].split(':')[0]
+ h = httprequest.environ.get('HTTP_HOST', '').split(':')[0]
d = h.split('.')[0]
r = openerp.tools.config['dbfilter'].replace('%h', h).replace('%d', d)
dbs = [i for i in dbs if re.match(r, i)]