Skip to content
Snippets Groups Projects
Commit 4a879cb4 authored by M.A Heshmatkhah's avatar M.A Heshmatkhah Committed by Julien Castiaux
Browse files

[FIX] auth_oauth: fragment_to_query_string return

Use the `fragment_to_query_string` decorator before the `route`
decorator on a controller endpoint. Traceback when the endpoint is
called as a `str` object is not a `Response` object.

Since httpocalypse it is advised that all decorators used with http-type
controllers return a Response. This makes it possible to decorate the
endpoint in any order, even before `@route`.

    # Preferred
    @route(...)
    @fragment_to_query_string
    def endpoint(...):
        ...

    # This work
    @fragment_to_query_string
    @route(...)
    def endpoint(...):
        ...

Part-of: odoo/odoo#109161
parent f1ac110c
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment