raise ValueError for bool inputs instead of returning as-is

Agent-Logs-Url: https://github.com/dylanlangston/nextcloud-mcp-server/sessions/0360ab28-8913-450e-8c61-697e71ba9742

Co-authored-by: dylanlangston <16236219+dylanlangston@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-14 23:04:18 +00:00
committed by GitHub
co-authored by dylanlangston
parent 6ae30acc6f
commit 480504f8b5
+2 -1
View File
@@ -64,7 +64,8 @@ class Nutrition(BaseModel):
stores whatever the source provided.
"""
if isinstance(v, bool):
return v
msg = "boolean values are not valid for nutrition fields"
raise ValueError(msg)
if isinstance(v, (int, float)):
return str(v)
return v