Skip to content

Commit 6420eaf

Browse files
committed
Merge PR #557 into 18.0
Signed-off-by lmignon
2 parents 3a265d8 + 7febe4b commit 6420eaf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

base_rest_auth_api_key/apispec/rest_method_security_plugin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
from apispec import BasePlugin
55

6+
from odoo.addons.base_rest.tools import ROUTING_DECORATOR_ATTR
7+
68

79
class RestMethodSecurityPlugin(BasePlugin):
810
def __init__(self, service):
@@ -18,7 +20,7 @@ def init_spec(self, spec):
1820
spec.components.security_scheme("api_key", api_key_scheme)
1921

2022
def operation_helper(self, path=None, operations=None, **kwargs):
21-
routing = kwargs.get("routing")
23+
routing = kwargs.get(ROUTING_DECORATOR_ATTR)
2224
if not routing:
2325
super().operation_helper(path, operations, **kwargs)
2426
if not operations:

0 commit comments

Comments
 (0)