mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix - /organization/new logic
This commit is contained in:
parent
5a65cdd4d4
commit
e022d7d197
1 changed files with 6 additions and 1 deletions
|
@ -7809,7 +7809,12 @@ async def new_organization(
|
||||||
|
|
||||||
If none provided, create one based on provided values
|
If none provided, create one based on provided values
|
||||||
"""
|
"""
|
||||||
budget_row = LiteLLM_BudgetTable(**data.json(exclude_none=True))
|
budget_params = LiteLLM_BudgetTable.model_fields.keys()
|
||||||
|
|
||||||
|
# Only include Budget Params when creating an entry in litellm_budgettable
|
||||||
|
_json_data = data.json(exclude_none=True)
|
||||||
|
_budget_data = {k: v for k, v in _json_data.items() if k in budget_params}
|
||||||
|
budget_row = LiteLLM_BudgetTable(**_budget_data)
|
||||||
|
|
||||||
new_budget = prisma_client.jsonify_object(budget_row.json(exclude_none=True))
|
new_budget = prisma_client.jsonify_object(budget_row.json(exclude_none=True))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue