mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot_merge: make Sentry middleware delegate to wrapped app
In Odoo 13, the cache middleware was modified to straight hit `http.root` assuming it's the Odoo root object. When `http.root` is replaced by a wrapping middleware, the entire thing blows up and shits the bed. Patch up by automatically delegating attribute accesses to the wrapped application (which is probably Root), although why this is not just folded into Root is getting less and less clear.
This commit is contained in:
parent
07918cddd6
commit
9980bfd843
@ -8,6 +8,9 @@ from sentry_sdk.integrations.wsgi import SentryWsgiMiddleware
|
||||
from odoo import http
|
||||
from . import models, controllers
|
||||
|
||||
def delegate(self, attr):
|
||||
return getattr(self.app, attr)
|
||||
SentryWsgiMiddleware.__getattr__ = delegate
|
||||
|
||||
def enable_sentry():
|
||||
logger = logging.getLogger('runbot_merge')
|
||||
|
Loading…
Reference in New Issue
Block a user