瀏覽代碼

fix: commit after app install

Since we destroy the connection after app installation,
mariadb implicitly rollsback the transaction hence committing upon successfull
app installation to prevent data sync loss

(cherry picked from commit 3539dacdf0)
version-14
phot0n 2 年之前
committed by Mergify
父節點
當前提交
5a61fcf28d
共有 2 個檔案被更改,包括 3 行新增2 行删除
  1. +3
    -0
      frappe/commands/site.py
  2. +0
    -2
      frappe/utils/fixtures.py

+ 3
- 0
frappe/commands/site.py 查看文件

@@ -420,6 +420,9 @@ def install_app(context, apps, force=False):
print(f"An error occurred while installing {app}{err_msg}")
exit_code = 1

if not exit_code:
frappe.db.commit()

frappe.destroy()

sys.exit(exit_code)


+ 0
- 2
frappe/utils/fixtures.py 查看文件

@@ -25,8 +25,6 @@ def sync_fixtures(app=None):

frappe.flags.in_fixtures = False

frappe.db.commit()


def import_custom_scripts(app):
"""Import custom scripts from `[app]/fixtures/custom_scripts`"""


Loading…
取消
儲存