Skip to content

Commit

Permalink
[16.0][FIX] Allow endpoint with slash in root path
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando La Chica committed Jul 17, 2023
1 parent 83ad879 commit 5974528
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fastapi/fastapi_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def dispatch(self, endpoint, args):
# don't parse the httprequest let starlette parse the stream
self.request.params = {} # dict(self.request.get_http_params(), **args)
environ = self._get_environ()
root_path = "/" + environ["PATH_INFO"].split("/")[1]
root_path = "/".join(environ["PATH_INFO"].split("/")[0:-1])
# TODO store the env into contextvar to be used by the odoo_env
# depends method
fastapi_endpoint = self.request.env["fastapi.endpoint"].sudo()
Expand Down
1 change: 1 addition & 0 deletions fastapi/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* Laurent Mignon <laurent.mignon@acsone.eu>
* Fernando La Chica <fernando.lachica@disashop.com>

0 comments on commit 5974528

Please sign in to comment.