Skip to content

Commit

Permalink
Merge PR OCA#2828 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by thomaspaulb
  • Loading branch information
OCA-git-bot committed Feb 5, 2024
2 parents 00a32d8 + e39ed29 commit dd24eeb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dbfilter_from_header/override.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit dd24eeb

Please sign in to comment.