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

Hard delete workspaces #685

Closed
wants to merge 3 commits into from
Closed

Hard delete workspaces #685

wants to merge 3 commits into from

Conversation

aponcedeleonch
Copy link
Contributor

Closes: #669

To hard delete a workspace it first needs to be soft deleted.

Closes: #669

To hard delete a workspace it first needs to be soft deleted.
@aponcedeleonch aponcedeleonch requested a review from JAORMX January 21, 2025 11:47
@@ -431,7 +460,7 @@ async def get_workspaces(self) -> List[WorkspaceActive]:
workspaces = await self._execute_select_pydantic_model(WorkspaceActive, sql)
return workspaces

async def get_workspace_by_name(self, name: str) -> Optional[Workspace]:
async def get_non_deleted_workspace_by_name(self, name: str) -> Optional[Workspace]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most of the time we'd be dealing with non deleted workspaces. I would suggest keeping the name get_workspace_by_name since it adheres to the expectation.

@@ -446,6 +475,21 @@ async def get_workspace_by_name(self, name: str) -> Optional[Workspace]:
)
return workspaces[0] if workspaces else None

async def get_workspace_by_name(self, name: str) -> Optional[Workspace]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we rename this to deal with the expectation that we're dealing with soft deleted or archived workspaces?

@JAORMX
Copy link
Contributor

JAORMX commented Jan 21, 2025

superceded by #686

@JAORMX JAORMX closed this Jan 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hard-delete workspaces
3 participants