diff --git a/sentry/__manifest__.py b/sentry/__manifest__.py index 1e756147b..3f7b8c75e 100644 --- a/sentry/__manifest__.py +++ b/sentry/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Sentry", "summary": "Report Odoo errors to Sentry", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "category": "Extra Tools", "website": "https://github.com/OCA/server-tools", "author": "Mohammed Barsi," diff --git a/sentry/hooks.py b/sentry/hooks.py index 789f93239..e085de7ae 100644 --- a/sentry/hooks.py +++ b/sentry/hooks.py @@ -6,7 +6,6 @@ import warnings from collections import abc import odoo.http -from odoo.service import wsgi_server from odoo.service.server import server from odoo.tools import config as odoo_config @@ -123,7 +122,7 @@ def initialize_sentry(config): server.app = SentryWsgiMiddleware(server.app) # Patch the wsgi server in case of further registration - wsgi_server.application = SentryWsgiMiddleware(wsgi_server.application) + odoo.http.Application = SentryWsgiMiddleware(odoo.http.Application) with sentry_sdk.push_scope() as scope: scope.set_extra("debug", False) diff --git a/sentry/tests/test_client.py b/sentry/tests/test_client.py index efbcb29d6..db2b9d3e7 100644 --- a/sentry/tests/test_client.py +++ b/sentry/tests/test_client.py @@ -3,8 +3,8 @@ import logging import sys +from unittest.mock import patch -from mock import patch from sentry_sdk.integrations.logging import _IGNORED_LOGGERS from sentry_sdk.transport import HttpTransport