fix: clear all cache after uninstalling apps (#33513)
This commit is contained in:
parent
8b02229b52
commit
2bb49d0cf4
1 changed files with 5 additions and 0 deletions
|
|
@ -333,6 +333,7 @@ def install_app(name, verbose=False, set_as_patched=True, force=False):
|
|||
for after_sync in app_hooks.after_sync or []:
|
||||
frappe.get_attr(after_sync)() #
|
||||
|
||||
frappe.clear_cache()
|
||||
frappe.client_cache.erase_persistent_caches()
|
||||
frappe.flags.in_install = False
|
||||
|
||||
|
|
@ -416,6 +417,7 @@ def remove_app(app_name, dry_run=False, yes=False, no_backup=False, force=False)
|
|||
remove_from_installed_apps(app_name)
|
||||
frappe.get_single("Installed Applications").update_versions()
|
||||
frappe.db.commit()
|
||||
frappe.clear_cache()
|
||||
|
||||
for after_uninstall in app_hooks.after_uninstall or []:
|
||||
frappe.get_attr(after_uninstall)()
|
||||
|
|
@ -428,6 +430,9 @@ def remove_app(app_name, dry_run=False, yes=False, no_backup=False, force=False)
|
|||
click.secho(f"Uninstalled App {app_name} from Site {site}", fg="green")
|
||||
frappe.flags.in_uninstall = False
|
||||
|
||||
if not dry_run:
|
||||
frappe.clear_cache()
|
||||
|
||||
|
||||
def _delete_modules(modules: list[str], dry_run: bool) -> list[str]:
|
||||
"""Delete modules belonging to the app and all related doctypes.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue