diff --git a/module_auto_update/migrations/10.0.2.0.0/pre-migrate.py b/module_auto_update/migrations/10.0.2.0.0/pre-migrate.py index b5f5aa86d..92135d174 100644 --- a/module_auto_update/migrations/10.0.2.0.0/pre-migrate.py +++ b/module_auto_update/migrations/10.0.2.0.0/pre-migrate.py @@ -12,10 +12,12 @@ _logger = logging.getLogger(__name__) def migrate(cr, version): """Autoenable deprecated behavior.""" try: - cr.execute( - "INSERT INTO ir_config_parameter (key, value) VALUES (%s, '1')", - (PARAM_DEPRECATED,) - ) + with cr.savepoint(): + cr.execute( + """INSERT INTO ir_config_parameter (key, value) + VALUES (%s, '1')""", + (PARAM_DEPRECATED,) + ) _logger.warn("Deprecated features have been autoenabled, see " "addon's README to know how to upgrade to the new " "supported autoupdate mechanism.")