Skip to content

Commit

Permalink
fix: Use tool key name without version when removing tool from database
Browse files Browse the repository at this point in the history
  • Loading branch information
acedward committed Feb 13, 2025
1 parent a784ceb commit a1afa7e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2271,14 +2271,14 @@ impl Node {
return Ok(());
}
let tool_router_key = tool_router_key.unwrap();

let tool_key_name = tool_router_key.to_string_without_version();
let version = tool_router_key.version;

// Attempt to remove the playground tool first
let _ = db_write.remove_tool_playground(&tool_key);

// Remove the tool from the database
match db_write.remove_tool(&tool_key, version) {
match db_write.remove_tool(&tool_key_name, version) {
Ok(_) => {
let response = json!({ "status": "success", "message": "Tool and associated playground (if any) removed successfully" });
let _ = res.send(Ok(response)).await;
Expand Down

0 comments on commit a1afa7e

Please sign in to comment.