Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

nit: replace delete with archive in workspace crud errors #764

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/codegate/workspaces/crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ async def soft_delete_workspace(self, workspace_name: str):
if workspace_name == "":
raise WorkspaceCrudError("Workspace name cannot be empty.")
if workspace_name == DEFAULT_WORKSPACE_NAME:
raise WorkspaceCrudError("Cannot delete default workspace.")
raise WorkspaceCrudError("Cannot archive default workspace.")

selected_workspace = await self._db_reader.get_workspace_by_name(workspace_name)
if not selected_workspace:
Expand All @@ -170,7 +170,7 @@ async def soft_delete_workspace(self, workspace_name: str):
# Check if workspace is active, if it is, make the default workspace active
active_workspace = await self._db_reader.get_active_workspace()
if active_workspace and active_workspace.id == selected_workspace.id:
raise WorkspaceCrudError("Cannot delete active workspace.")
raise WorkspaceCrudError("Cannot archive active workspace.")

db_recorder = DbRecorder()
try:
Expand Down
Loading