Skip to content

Commit

Permalink
queue job avoiding AccessDenied when loading the module in an instanc…
Browse files Browse the repository at this point in the history
…e with list_db=false
  • Loading branch information
pcastelovigo authored and guewen committed Nov 22, 2023
1 parent 65bdcdd commit 642d286
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions queue_job/jobrunner/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,12 @@ def from_environ_or_config(cls):
return runner

def get_db_names(self):
"""
>>> runner = QueueJobRunner()
>>> config["db_name"] = None
>>> runner.get_db_names()
['odoo']
"""
if config["db_name"]:
db_names = config["db_name"].split(",")
else:
Expand Down

0 comments on commit 642d286

Please sign in to comment.