changeset 72bbf1073be9 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset&node=72bbf1073be9
description:
        Commit the transaction after creating indexes and update history

        issue11855
        review433681003
diffstat:

 trytond/modules/__init__.py |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (17 lines):

diff -r 4da4f8a946ad -r 72bbf1073be9 trytond/modules/__init__.py
--- a/trytond/modules/__init__.py       Sat Nov 05 09:51:17 2022 +0100
+++ b/trytond/modules/__init__.py       Sat Nov 05 09:54:14 2022 +0100
@@ -298,11 +298,13 @@
                 if model._sql_indexes:
                     logger.info('index:create %s', model_name)
                     model._update_sql_indexes()
+            transaction.commit()
             for model_name in models_to_update_history:
                 model = pool.get(model_name)
                 if model._history:
                     logger.info('history:update %s', model.__name__)
                     model._update_history_table()
+            transaction.commit()
 
         # Vacuum :
         while modules_todo:

Reply via email to