Skip to content

Commit

Permalink
fix: use workspace title instead of name
Browse files Browse the repository at this point in the history
this is how workspaces work 🤷
  • Loading branch information
ankush committed Apr 10, 2024
1 parent df94943 commit 3cb7466
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frappe/public/js/frappe/views/workspace/workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ frappe.views.Workspace = class Workspace {

if (frappe.boot.user.default_workspace) {
default_page = {
name: frappe.boot.user.default_workspace.name,
name: frappe.boot.user.default_workspace.title,
public: frappe.boot.user.default_workspace.public,
};
} else if (
Expand Down
8 changes: 6 additions & 2 deletions frappe/utils/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,12 @@ def load_user(self):
self.build_permissions()

if d.get("default_workspace"):
public = frappe.get_cached_value("Workspace", d.default_workspace, "public")
d.default_workspace = {"name": d.default_workspace, "public": public}
workspace = frappe.get_cached_doc("Workspace", d.default_workspace)
d.default_workspace = {
"name": workspace.name,
"public": workspace.public,
"title": workspace.title,
}

d.name = self.name
d.onboarding_status = frappe.parse_json(d.onboarding_status)
Expand Down

0 comments on commit 3cb7466

Please sign in to comment.