mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
build(pyproject.toml): add new dev dependencies - for type checking (#9631)
* build(pyproject.toml): add new dev dependencies - for type checking * build: reformat files to fit black * ci: reformat to fit black * ci(test-litellm.yml): make tests run clear * build(pyproject.toml): add ruff * fix: fix ruff checks * build(mypy/): fix mypy linting errors * fix(hashicorp_secret_manager.py): fix passing cert for tls auth * build(mypy/): resolve all mypy errors * test: update test * fix: fix black formatting * build(pre-commit-config.yaml): use poetry run black * fix(proxy_server.py): fix linting error * fix: fix ruff safe representation error
This commit is contained in:
parent
95e5dfae5a
commit
9b7ebb6a7d
214 changed files with 1553 additions and 1433 deletions
|
@ -358,11 +358,11 @@ async def info_organization(organization_id: str):
|
|||
if prisma_client is None:
|
||||
raise HTTPException(status_code=500, detail={"error": "No db connected"})
|
||||
|
||||
response: Optional[LiteLLM_OrganizationTableWithMembers] = (
|
||||
await prisma_client.db.litellm_organizationtable.find_unique(
|
||||
where={"organization_id": organization_id},
|
||||
include={"litellm_budget_table": True, "members": True, "teams": True},
|
||||
)
|
||||
response: Optional[
|
||||
LiteLLM_OrganizationTableWithMembers
|
||||
] = await prisma_client.db.litellm_organizationtable.find_unique(
|
||||
where={"organization_id": organization_id},
|
||||
include={"litellm_budget_table": True, "members": True, "teams": True},
|
||||
)
|
||||
|
||||
if response is None:
|
||||
|
@ -486,12 +486,13 @@ async def organization_member_add(
|
|||
updated_organization_memberships: List[LiteLLM_OrganizationMembershipTable] = []
|
||||
|
||||
for member in members:
|
||||
updated_user, updated_organization_membership = (
|
||||
await add_member_to_organization(
|
||||
member=member,
|
||||
organization_id=data.organization_id,
|
||||
prisma_client=prisma_client,
|
||||
)
|
||||
(
|
||||
updated_user,
|
||||
updated_organization_membership,
|
||||
) = await add_member_to_organization(
|
||||
member=member,
|
||||
organization_id=data.organization_id,
|
||||
prisma_client=prisma_client,
|
||||
)
|
||||
|
||||
updated_users.append(updated_user)
|
||||
|
@ -657,16 +658,16 @@ async def organization_member_update(
|
|||
},
|
||||
data={"budget_id": budget_id},
|
||||
)
|
||||
final_organization_membership: Optional[BaseModel] = (
|
||||
await prisma_client.db.litellm_organizationmembership.find_unique(
|
||||
where={
|
||||
"user_id_organization_id": {
|
||||
"user_id": data.user_id,
|
||||
"organization_id": data.organization_id,
|
||||
}
|
||||
},
|
||||
include={"litellm_budget_table": True},
|
||||
)
|
||||
final_organization_membership: Optional[
|
||||
BaseModel
|
||||
] = await prisma_client.db.litellm_organizationmembership.find_unique(
|
||||
where={
|
||||
"user_id_organization_id": {
|
||||
"user_id": data.user_id,
|
||||
"organization_id": data.organization_id,
|
||||
}
|
||||
},
|
||||
include={"litellm_budget_table": True},
|
||||
)
|
||||
|
||||
if final_organization_membership is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue