diff --git a/dbfilter_from_header/override.py b/dbfilter_from_header/override.py index f759575b169..43294d8180b 100644 --- a/dbfilter_from_header/override.py +++ b/dbfilter_from_header/override.py @@ -13,11 +13,13 @@ def db_filter(dbs, host=None): - dbs = db_filter_org(dbs, host) + dbs_orig = db_filter_org(dbs, host) httprequest = http.request.httprequest db_filter_hdr = httprequest.environ.get("HTTP_X_ODOO_DBFILTER") if db_filter_hdr: dbs = [db for db in dbs if re.match(db_filter_hdr, db)] + else: + dbs = dbs_orig return dbs