mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
fix: exclude team_id from Prisma create payload in _prepare_mcp_server_data
team_id is a request-level field, not a DB column. Excluding it prevents Prisma from rejecting the create call. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
971cc2a9af
commit
f4e5fb2b4a
1 changed files with 2 additions and 2 deletions
|
|
@ -40,8 +40,8 @@ def _prepare_mcp_server_data(
|
|||
"""
|
||||
from litellm.litellm_core_utils.safe_json_dumps import safe_dumps
|
||||
|
||||
# Convert model to dict
|
||||
data_dict = data.model_dump(exclude_none=True)
|
||||
# Convert model to dict, excluding fields not in the DB schema
|
||||
data_dict = data.model_dump(exclude_none=True, exclude={"team_id"})
|
||||
# Ensure alias is always present in the dict (even if None)
|
||||
if "alias" not in data_dict:
|
||||
data_dict["alias"] = getattr(data, "alias", None)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue