Skip to content

Commit

Permalink
View: Further de-dupe
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Puerto committed Feb 16, 2024
1 parent c400293 commit 563fd0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/user_workspaces_server/views/workspace_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def put(self, request, workspace_id, put_type=None):
workspace.workspace_details["current_workspace_details"]["files"] = [
{"name": file_name}
for file_name in {
file["name"]
(file["name"] if file["name"][0] == "/" else f"/{file['name']}")
for file in workspace_details.get("files", [])
+ workspace.workspace_details["current_workspace_details"]["files"]
}
Expand All @@ -188,7 +188,7 @@ def put(self, request, workspace_id, put_type=None):
workspace.workspace_details["current_workspace_details"]["symlinks"] = [
{"name": symlink_name}
for symlink_name in {
symlink["name"]
(symlink["name"] if symlink["name"][0] == "/" else f"/{symlink['name']}")
for symlink in workspace_details.get("symlinks", [])
+ workspace.workspace_details["current_workspace_details"]["symlinks"]
}
Expand Down

0 comments on commit 563fd0c

Please sign in to comment.