fix: Set home workspace as first available for user

The default Build Workspace may not be available for all users
depending on Role/Permissions settings. To handle this, instead of
assuming everyone gets Build, we'll dynamically pick from the
available workspaces instead

(cherry picked from commit 3b427389473fc4fbf3e31e3c936dd6023427ab36)
This commit is contained in:
Gavin D'souza 2021-05-19 15:36:46 +05:30 committed by mergify-bot
parent 00af014cca
commit 42f2d87a68

View file

@ -289,7 +289,7 @@ frappe.Application = class Application {
}
if (!frappe.workspaces['home']) {
// default workspace is settings for Frappe
frappe.workspaces['home'] = frappe.workspaces['build'];
frappe.workspaces['home'] = frappe.workspaces[Object.keys(frappe.workspaces)[0]];
}
}