diff --git a/frappe/__init__.py b/frappe/__init__.py index b7fd117868..23d40f08a9 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -1400,7 +1400,12 @@ def get_all_apps(with_internal_apps=True, sites_path=None): @request_cache def get_installed_apps(sort=False, frappe_last=False): - """Get list of installed apps in current site.""" + """ + Get list of installed apps in current site. + + :param sort: [DEPRECATED] Sort installed apps based on the sequence in sites/apps.txt + """ + if getattr(flags, "in_install_db", True): return [] @@ -1445,7 +1450,7 @@ def _load_app_hooks(app_name: str | None = None): import types hooks = {} - apps = [app_name] if app_name else get_installed_apps(sort=True) + apps = [app_name] if app_name else get_installed_apps() for app in apps: try: diff --git a/frappe/utils/change_log.py b/frappe/utils/change_log.py index 12069cce09..6850a9bbf9 100644 --- a/frappe/utils/change_log.py +++ b/frappe/utils/change_log.py @@ -108,7 +108,7 @@ def get_versions(): } }""" versions = {} - for app in frappe.get_installed_apps(sort=True): + for app in frappe.get_installed_apps(): app_hooks = frappe.get_hooks(app_name=app) versions[app] = { "title": app_hooks.get("app_title")[0], diff --git a/frappe/utils/jinja.py b/frappe/utils/jinja.py index 33bb929bc4..0e5c03eff0 100644 --- a/frappe/utils/jinja.py +++ b/frappe/utils/jinja.py @@ -112,8 +112,7 @@ def get_jloader(): apps = frappe.get_hooks("template_apps") if not apps: - apps = frappe.local.flags.web_pages_apps or frappe.get_installed_apps(sort=True) - apps.reverse() + apps = list(reversed(frappe.local.flags.web_pages_apps or frappe.get_installed_apps())) if "frappe" not in apps: apps.append("frappe")