-
-
Notifications
You must be signed in to change notification settings - Fork 532
[16.0][FIX] Patch Request._get_session_and_dbname to get db from URL #504
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
[16.0][FIX] Patch Request._get_session_and_dbname to get db from URL #504
Conversation
|
Hi @guewen, |
931d2aa to
ac10d2a
Compare
|
Pre-commit is failing because of isort problem. Fixed by updating copier template in #505 |
|
Thanks! I agree that monkeypatching should be avoided if possible. Is the |
|
@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 Fixes OCA#503
ac10d2a to
1f3e2b1
Compare
zuher83
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Work with me 🙂 Thanks
davejames
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
functional review, works well here in a multi-db scenario
guewen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|
/ocabot merge patch |
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
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.