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
This commit is contained in:
phot0n 2022-09-12 00:38:55 +05:30
parent 51ac3e8a99
commit 3539dacdf0
2 changed files with 3 additions and 2 deletions

View file

@ -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)

View file

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