mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-05 10:13:05 +00:00
handle case where 'data' is not an attribute in unregister_toolgroup
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
This commit is contained in:
parent
0c3f9f46f5
commit
524505d82e
1 changed files with 1 additions and 1 deletions
|
@ -609,7 +609,7 @@ class ToolGroupsRoutingTable(CommonRoutingTableImpl, ToolGroups):
|
||||||
if tool_group is None:
|
if tool_group is None:
|
||||||
raise ValueError(f"Tool group {toolgroup_id} not found")
|
raise ValueError(f"Tool group {toolgroup_id} not found")
|
||||||
tools = await self.list_tools(toolgroup_id)
|
tools = await self.list_tools(toolgroup_id)
|
||||||
for tool in tools.data:
|
for tool in getattr(tools, "data", []):
|
||||||
await self.unregister_object(tool)
|
await self.unregister_object(tool)
|
||||||
await self.unregister_object(tool_group)
|
await self.unregister_object(tool_group)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue