Skip to content

Commit

Permalink
fix: send delete-forever request in client
Browse files Browse the repository at this point in the history
  • Loading branch information
fregataa committed Mar 7, 2024
1 parent c9e4c4f commit c17abc8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ai/backend/client/cli/vfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ def create(name, host, group, host_path, usage_mode, permission, cloneable):
sys.exit(ExitCode.FAILURE)


@vfolder.command()
@vfolder.command(aliases=["move-to-trash"])
@click.argument("name", type=str)
def move_to_trash(name):
def trash(name):
"""Move the given virtual folder to trash-bin. The virtual folder will be under `delete-pending` status.
This operation can be retracted by
calling `restore()`.
Expand Down
3 changes: 2 additions & 1 deletion src/ai/backend/client/func/vfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ async def delete_forever(self) -> Mapping[str, Any]:
rqst.set_json({
"id": self.id.hex,
})
return {}
async with rqst.fetch():
return {}

@api_function
async def rename(self, new_name):
Expand Down

0 comments on commit c17abc8

Please sign in to comment.