Kaynağa Gözat

fix: sync app dashboard on app install

* chore: fix sync_dashboards' docstring

(cherry picked from commit 51ac3e8a99)
version-14
phot0n 2 yıl önce
committed by Mergify
ebeveyn
işleme
cf52f5f9c6
2 değiştirilmiş dosya ile 4 ekleme ve 1 silme
  1. +2
    -0
      frappe/installer.py
  2. +2
    -1
      frappe/utils/dashboard.py

+ 2
- 0
frappe/installer.py Dosyayı Görüntüle

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


+ 2
- 1
frappe/utils/dashboard.py Dosyayı Görüntüle

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


Yükleniyor…
İptal
Kaydet