From 89c2364025590335aa01ee887a243aa9ef5df871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miquel=20Ra=C3=AFch?= Date: Mon, 30 Sep 2024 00:33:31 +0200 Subject: [PATCH] [FIX] queue_job: Environment.manage() is deprecated --- queue_job/migrations/15.0.1.1.0/post-migration.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/queue_job/migrations/15.0.1.1.0/post-migration.py b/queue_job/migrations/15.0.1.1.0/post-migration.py index f6eff72707..907dd05344 100644 --- a/queue_job/migrations/15.0.1.1.0/post-migration.py +++ b/queue_job/migrations/15.0.1.1.0/post-migration.py @@ -8,10 +8,9 @@ def migrate(cr, version): - with api.Environment.manage(): - env = api.Environment(cr, SUPERUSER_ID, {}) - _logger.info("Computing exception name for failed jobs") - _compute_jobs_new_values(env) + env = api.Environment(cr, SUPERUSER_ID, {}) + _logger.info("Computing exception name for failed jobs") + _compute_jobs_new_values(env) def _compute_jobs_new_values(env):