[FIX]DBFilter from config : when httprequest is none
This commit is contained in:
parent
b23084eea3
commit
e19401bd25
@ -27,7 +27,7 @@
|
|||||||
Also required : `proxy_mode` to `True`
|
Also required : `proxy_mode` to `True`
|
||||||
|
|
||||||
Inspired from OCA `dbfilter_from_header`.""",
|
Inspired from OCA `dbfilter_from_header`.""",
|
||||||
'version': '15.0.0.0.3',
|
'version': '15.0.0.0.4',
|
||||||
'category': 'Yaltik',
|
'category': 'Yaltik',
|
||||||
'author': 'Fabien Bourgeois',
|
'author': 'Fabien Bourgeois',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
|
@ -38,7 +38,7 @@ http_host_resolv = {}
|
|||||||
|
|
||||||
def db_filter(dbs, httprequest=None):
|
def db_filter(dbs, httprequest=None):
|
||||||
""" Override db_filter """
|
""" Override db_filter """
|
||||||
http_host = httprequest.environ.get('HTTP_HOST', '').split(':')[0]
|
http_host = httprequest.environ.get('HTTP_HOST', '').split(':')[0] if httprequest else ''
|
||||||
if db_filter_str:
|
if db_filter_str:
|
||||||
httprequest = httprequest or http.request.httprequest
|
httprequest = httprequest or http.request.httprequest
|
||||||
# If in cache and not empty
|
# If in cache and not empty
|
||||||
|
Loading…
x
Reference in New Issue
Block a user