From 7febe4b2d1bf8f0ad89caff95f8eb22e19333a19 Mon Sep 17 00:00:00 2001 From: Emad Shaaban Date: Thu, 7 Aug 2025 15:13:45 +0300 Subject: [PATCH] [FIX] base_rest_auth_api_key: fix method security plugin --- base_rest_auth_api_key/apispec/rest_method_security_plugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base_rest_auth_api_key/apispec/rest_method_security_plugin.py b/base_rest_auth_api_key/apispec/rest_method_security_plugin.py index 5c56d6cfe..22ceea06f 100644 --- a/base_rest_auth_api_key/apispec/rest_method_security_plugin.py +++ b/base_rest_auth_api_key/apispec/rest_method_security_plugin.py @@ -3,6 +3,8 @@ from apispec import BasePlugin +from odoo.addons.base_rest.tools import ROUTING_DECORATOR_ATTR + class RestMethodSecurityPlugin(BasePlugin): def __init__(self, service): @@ -18,7 +20,7 @@ def init_spec(self, spec): spec.components.security_scheme("api_key", api_key_scheme) def operation_helper(self, path=None, operations=None, **kwargs): - routing = kwargs.get("routing") + routing = kwargs.get(ROUTING_DECORATOR_ATTR) if not routing: super().operation_helper(path, operations, **kwargs) if not operations: