mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
fix: allow clearing budget_fallbacks in edit view when key had existing fallbacks
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
640ee9384b
commit
a55cc3aab3
1 changed files with 4 additions and 0 deletions
|
|
@ -308,8 +308,12 @@ export function KeyEditView({
|
|||
values.budget_limits = [];
|
||||
}
|
||||
|
||||
const hadExistingFallbacks =
|
||||
keyData.budget_fallbacks != null && Object.keys(keyData.budget_fallbacks).length > 0;
|
||||
if (Object.keys(budgetFallbacks).length > 0) {
|
||||
values.budget_fallbacks = budgetFallbacks;
|
||||
} else if (hadExistingFallbacks) {
|
||||
values.budget_fallbacks = {};
|
||||
}
|
||||
|
||||
await onSubmit(values);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue