mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-14 18:23:13 +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:
co-authored by
Claude Opus 4.6
parent
971cc2a9af
commit
f4e5fb2b4a
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user