Skip to content

Commit

Permalink
[FIX] ignore dbfilter containing %d or %h, fixes OCA#58
Browse files Browse the repository at this point in the history
This is a temporary fix. In version 4.0,
dbfilter will be completely ignored by connector.
  • Loading branch information
sbidoul authored and bizzappdev committed Nov 23, 2023
1 parent f4201fc commit 69bdcaf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion queue_job/jobrunner/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def get_db_names(self):
else:
db_names = openerp.service.db.exp_list(True)
dbfilter = openerp.tools.config['dbfilter']
if dbfilter:
if dbfilter and '%d' not in dbfilter and '%h' not in dbfilter:
db_names = [d for d in db_names if re.match(dbfilter, d)]
return db_names

Expand Down
2 changes: 1 addition & 1 deletion queue_job/queue/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def available_db_names():
else:
db_names = []
dbfilter = config['dbfilter']
if dbfilter and db_names:
if dbfilter and '%d' not in dbfilter and '%h' not in dbfilter:
db_names = [d for d in db_names if re.match(dbfilter, d)]
available_db_names = []
for db_name in db_names:
Expand Down

0 comments on commit 69bdcaf

Please sign in to comment.