Parcourir la source

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 il y a 2 ans
committed by Mergify
Parent
révision
5a61fcf28d
2 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. +3
    -0
      frappe/commands/site.py
  2. +0
    -2
      frappe/utils/fixtures.py

+ 3
- 0
frappe/commands/site.py Voir le fichier

@@ -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 Voir le fichier

@@ -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`"""


Chargement…
Annuler
Enregistrer