From b0ac8ca961d1d81cdf29cefd35b9c91e166817ef Mon Sep 17 00:00:00 2001 From: Eugene Molotov Date: Tue, 28 Jan 2025 17:08:47 +0500 Subject: [PATCH] [FIX] sentry: add compatibility with sentry-sdk from debian bullseye repository Debian Bullseye is used as base docker image for odoo:16.0 --- sentry/const.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/sentry/const.py b/sentry/const.py index 9f7eab3af95..78b783bddf8 100644 --- a/sentry/const.py +++ b/sentry/const.py @@ -77,7 +77,7 @@ def get_sentry_logging(level=DEFAULT_LOG_LEVEL): def get_sentry_options(): - return [ + res = [ SentryOption("dsn", "", str.strip), SentryOption("transport", DEFAULT_OPTIONS["transport"], select_transport), SentryOption("logging_level", DEFAULT_LOG_LEVEL, get_sentry_logging), @@ -116,9 +116,15 @@ def get_sentry_options(): DEFAULT_OPTIONS["traces_sample_rate"], to_float_if_defined, ), - SentryOption( - "auto_enabling_integrations", - DEFAULT_OPTIONS["auto_enabling_integrations"], - None, - ), ] + + if "auto_enabling_integrations" in DEFAULT_OPTIONS: + res.append( + SentryOption( + "auto_enabling_integrations", + DEFAULT_OPTIONS["auto_enabling_integrations"], + None, + ) + ) + + return res