diff --git a/frappe/installer.py b/frappe/installer.py index d7394ab3f2..4f1755c2a0 100644 --- a/frappe/installer.py +++ b/frappe/installer.py @@ -11,6 +11,7 @@ import click import frappe from frappe.defaults import _clear_cache from frappe.utils import cint, is_git_url +from frappe.utils.dashboard import sync_dashboards def _is_scheduler_enabled() -> bool: @@ -301,6 +302,7 @@ def install_app(name, verbose=False, set_as_patched=True, force=False): sync_jobs() sync_fixtures(name) sync_customizations(name) + sync_dashboards(name) for after_sync in app_hooks.after_sync or []: frappe.get_attr(after_sync)() # diff --git a/frappe/utils/dashboard.py b/frappe/utils/dashboard.py index 6acd63274e..125e0d2245 100644 --- a/frappe/utils/dashboard.py +++ b/frappe/utils/dashboard.py @@ -84,9 +84,10 @@ def get_dashboards_with_link(docname, doctype): def sync_dashboards(app=None): - """Import, overwrite fixtures from `[app]/fixtures`""" + """Import, overwrite dashboards from `[app]/[app]_dashboard`""" if not cint(frappe.db.get_single_value("System Settings", "setup_complete")): return + if app: apps = [app] else: