Skip to content

Commit e1dc4e2

Browse files
OhYeeCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: OhYee <oyohyee@oyohyee.com>
1 parent 1b32424 commit e1dc4e2

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎agentrun/tool/model.py‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,13 @@ def from_any_openapi_schema(cls, schema: Any) -> "ToolSchema":
293293

294294
additional_properties_raw = pydash_get(schema, "additionalProperties")
295295
additional_properties = (
296-
cls.from_any_openapi_schema(additional_properties_raw)
297-
if isinstance(additional_properties_raw, dict)
298-
else additional_properties_raw
296+
cls()
297+
if additional_properties_raw == {}
298+
else (
299+
cls.from_any_openapi_schema(additional_properties_raw)
300+
if isinstance(additional_properties_raw, dict)
301+
else additional_properties_raw
302+
)
299303
)
300304

301305
return cls(

0 commit comments

Comments
 (0)