forked from phoenix/litellm-mirror
fix team update bug
This commit is contained in:
parent
4795fced10
commit
6edaaa92ab
1 changed files with 2 additions and 1 deletions
|
@ -6023,6 +6023,7 @@ async def update_team(
|
|||
|
||||
if data.team_id is None:
|
||||
raise HTTPException(status_code=400, detail={"error": "No team id passed in"})
|
||||
verbose_proxy_logger.debug("/team/update - %s", data)
|
||||
|
||||
existing_team_row = await prisma_client.get_data(
|
||||
team_id=data.team_id, table_name="team", query_type="find_unique"
|
||||
|
@ -6073,7 +6074,7 @@ async def update_team(
|
|||
## Get diff
|
||||
if existing_team_row.members_with_roles is not None:
|
||||
for user in existing_team_row.members_with_roles:
|
||||
if user["user_id"] not in new_user_id_list:
|
||||
if user["user_id"] not in new_user_id_list and len(new_user_id_list) > 0:
|
||||
deleted_user_id_list.append(user["user_id"])
|
||||
|
||||
## SET UPDATED LIST
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue