Skip to content

Commit c9f10cf

Browse files
[FIX] auth_jwt: mute noisy Odoo test patch checker
See odoo/odoo#247151
1 parent 46f87ca commit c9f10cf

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

auth_jwt/models/auth_jwt_validator.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
from odoo import _, api, fields, models, tools
1515
from odoo.exceptions import ValidationError
16+
from odoo.tests.common import SETATTR_SOURCES
1617

1718
from ..exceptions import (
1819
AmbiguousJwtValidator,
@@ -28,6 +29,12 @@
2829

2930
AUTHORIZATION_RE = re.compile(r"^Bearer ([^ ]+)$")
3031

32+
# Register this model's patching method in Odoo's test checker
33+
SETATTR_SOURCES["_register_auth_method"] = tuple(
34+
list(SETATTR_SOURCES.get("_register_auth_method", []))
35+
+ ["/auth_jwt/models/auth_jwt_validator.py"],
36+
)
37+
3138

3239
class AuthJwtValidator(models.Model):
3340
_name = "auth.jwt.validator"

0 commit comments

Comments
 (0)