Uh oh!
There was an error while loading. Please reload this page.
[16.0][FIX] Patch Request._get_session_and_dbname to get db from URL - #504
Conversation
OCA-git-bot
commented
Feb 1, 2023
Hi @guewen, |
931d2aa to
ac10d2aComparehugosantosred
commented
Feb 1, 2023
Pre-commit is failing because of isort problem. Fixed by updating copier template in #505 |
StefanRijnhart
commented
Feb 7, 2023
Thanks! I agree that monkeypatching should be avoided if possible. Is the |
hugosantosred
commented
Feb 9, 2023
@StefanRijnhart At that point, the In the requests that are getting served with the _serve_nodb method, there is not env available, and setting the request.db does nothing. |
In servers with multiple databases db is not captured from URL when processing jobs in /queue_job/runjob With this patch db is set from the db param in URL when calling the runjob endpoint FixesOCA#503
ac10d2a to
1f3e2b1Compare
davejames
left a comment
There was a problem hiding this comment.
functional review, works well here in a multi-db scenario
guewen
left a comment
There was a problem hiding this comment.
Thanks for the fix!
Also, thanks for checking if avoiding a monkey patch was possible. Sadly not, but at least it is applied very narrowly.
guewen
commented
Jun 2, 2023
/ocabot merge patch |
OCA-git-bot
commented
Jun 2, 2023
Hey, thanks for contributing! Proceeding to merge this for you. |
OCA-git-bot
commented
Jun 2, 2023
Congratulations, your PR was merged at 72f7c98. Thanks a lot for contributing to OCA. ❤️ |
In servers with multiple databases db is not captured from URL when processing jobs in /queue_job/runjob
With this patch db is set from the db param in URL when calling the runjob endpoint
Fixes#503
Maybe this monkey patch is not the most elegant or efficient solution, but this is the only way that I've managed to set the right db in order to call the petition with the
request._serve_dbmethod after the http.py complete refactor in v16.