fix: redirect to default app is not working

This commit is contained in:
Shariq Ansari 2024-08-16 14:23:20 +05:30
parent 0d6ecfbd22
commit 14b9800baf

View file

@ -33,10 +33,9 @@ def get_apps():
def get_route(app_name):
hooks = frappe.get_hooks(app_name=app_name)
if hooks.get("app_icon_route"):
return hooks.get("app_icon_route")[0]
return "/apps"
links = frappe.get_hooks("add_to_apps_screen", app_name=app_name)
app = next((link for link in links if link.get("name") == app_name), None)
return app.get("route") if app and app.get("route") else "/apps"
def is_desk_apps(apps):