fix: add correct methods for migration and installation
This commit is contained in:
parent
5e6386ac13
commit
bf0dd1bf24
3 changed files with 12 additions and 6 deletions
|
|
@ -690,6 +690,6 @@ def set_sequence(desktop_icons):
|
|||
frappe.toast(frappe._("Updated"))
|
||||
|
||||
|
||||
def create_desktop_icon():
|
||||
def create_desktop_icons():
|
||||
create_desktop_icons_from_installed_apps()
|
||||
create_desktop_icons_from_workspace()
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ from semantic_version import Version
|
|||
|
||||
import frappe
|
||||
from frappe.defaults import _clear_cache
|
||||
from frappe.desk.doctype.desktop_icon.desktop_icon import create_desktop_icon, sync_desktop_icons
|
||||
from frappe.desk.doctype.desktop_icon.desktop_icon import create_desktop_icons, sync_desktop_icons
|
||||
from frappe.desk.doctype.workspace_sidebar.workspace_sidebar import create_workspace_sidebar_for_workspaces
|
||||
from frappe.utils import cint, is_git_url
|
||||
from frappe.utils.dashboard import sync_dashboards
|
||||
from frappe.utils.synchronization import filelock
|
||||
|
|
@ -338,7 +339,8 @@ def install_app(name, verbose=False, set_as_patched=True, force=False):
|
|||
sync_fixtures(name)
|
||||
sync_customizations(name)
|
||||
sync_dashboards(name)
|
||||
sync_desktop_icons()
|
||||
create_desktop_icons()
|
||||
create_workspace_sidebar_for_workspaces()
|
||||
|
||||
for after_sync in app_hooks.after_sync or []:
|
||||
frappe.get_attr(after_sync)() #
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ from frappe.core.doctype.navbar_settings.navbar_settings import sync_standard_it
|
|||
from frappe.core.doctype.scheduled_job_type.scheduled_job_type import sync_jobs
|
||||
from frappe.database.schema import add_column
|
||||
from frappe.deferred_insert import save_to_db as flush_deferred_inserts
|
||||
from frappe.desk.doctype.desktop_icon.desktop_icon import create_desktop_icon
|
||||
from frappe.desk.doctype.desktop_icon.desktop_icon import create_desktop_icons
|
||||
from frappe.desk.doctype.workspace_sidebar.workspace_sidebar import create_workspace_sidebar_for_workspaces
|
||||
from frappe.desk.notifications import clear_notifications
|
||||
from frappe.modules.patch_handler import PatchType
|
||||
from frappe.modules.utils import sync_customizations
|
||||
|
|
@ -189,8 +190,11 @@ class SiteMigration:
|
|||
print("Updating installed applications...")
|
||||
frappe.get_single("Installed Applications").update_versions()
|
||||
|
||||
print("Syncing Desktop Icons...")
|
||||
create_desktop_icon()
|
||||
print("Creating Desktop Icons...")
|
||||
create_desktop_icons()
|
||||
|
||||
print("Creating Workspace Sidebars..")
|
||||
create_workspace_sidebar_for_workspaces()
|
||||
|
||||
print("Executing `after_migrate` hooks...")
|
||||
for app in frappe.get_installed_apps():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue