Преглед изворни кода

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…
Откажи
Сачувај