mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
(bug fix) /key/update was not storing budget_duration
in the DB (#6941)
* fix - store budget_duration for keys * test_generate_and_update_key * test_update_user_unit_test * fix user update
This commit is contained in:
parent
78045d961d
commit
32f21b6af9
2 changed files with 84 additions and 1 deletions
|
@ -476,6 +476,7 @@ def prepare_key_update_data(
|
|||
duration_s = duration_in_seconds(duration=budget_duration)
|
||||
key_reset_at = datetime.now(timezone.utc) + timedelta(seconds=duration_s)
|
||||
non_default_values["budget_reset_at"] = key_reset_at
|
||||
non_default_values["budget_duration"] = budget_duration
|
||||
|
||||
_metadata = existing_key_row.metadata or {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue