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 Jun 13, 2023
1 parent f1f6690 commit 88c6869
Showing 1 changed file with 1 addition 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

0 comments on commit 88c6869

Please sign in to comment.