Skip to content

dbfilter_from_header bugfix #3266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
matmicro opened this issue Apr 15, 2025 · 2 comments
Open

dbfilter_from_header bugfix #3266

matmicro opened this issue Apr 15, 2025 · 2 comments

Comments

@matmicro
Copy link

matmicro commented Apr 15, 2025

I propose a change into the OCA module dbfilter_from_header.

The change is to replace the line:
https://github.com/OCA/server-tools/blob/16.0/dbfilter_from_header/override.py:20

        dbs = [db for db in dbs if re.match(db_filter_hdr, db)]

And replace it by:

        dbs = [db for db in dbs_orig if re.match(db_filter_hdr, db)]

This change will allow to combine dbfilter_from_header AND the basic dbfilter.
This is really useful the generate some powerful regex like:

dbfilter = ^prod_\w+
dbfilter_from_header = \w+_%d$

Or maybe this commit is a regression that was introduced, and do not allow anymore to use both filters at the same time: @cvinh
e39ed29

@cvinh
Copy link
Contributor

cvinh commented Apr 15, 2025

Hello
Thanks for your suggestion.
For better followup, can you review the PR with your suggestion ?
#3261
Best regards

@matmicro
Copy link
Author

Hi @cvinh
I added as comment.
Please also fwd the fix to the v16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants