diff --git a/hypha/VERSION b/hypha/VERSION index b7465d44..003d9991 100644 --- a/hypha/VERSION +++ b/hypha/VERSION @@ -1,3 +1,3 @@ { - "version": "0.20.33.post1" + "version": "0.20.33.post2" } diff --git a/hypha/core/workspace.py b/hypha/core/workspace.py index 6a243442..6d578864 100644 --- a/hypha/core/workspace.py +++ b/hypha/core/workspace.py @@ -152,6 +152,9 @@ async def _bookmark_workspace( user_workspace.config = user_workspace.config or {} if "bookmarks" not in user_workspace.config: user_workspace.config["bookmarks"] = [] + for bookmark in user_workspace.config["bookmarks"]: + if bookmark["name"] == workspace.name: + return user_workspace.config["bookmarks"].append( { "type": "workspace", @@ -1155,6 +1158,8 @@ async def list_workspaces( "description": workspace.description, } ] + # remove duplicates + workspaces = [dict(t) for t in {tuple(d.items()) for d in workspaces}] return workspaces async def _update_workspace(