mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
refactor(proxy): rename the audit hook's user row variable
The typed-vs-raw distinction the _litellm_typed suffix marked is gone now that the repository returns LiteLLM_UserTable directly.
This commit is contained in:
parent
cee78d61ea
commit
7c388b1fd9
1 changed files with 4 additions and 4 deletions
|
|
@ -57,18 +57,18 @@ class UserManagementEventHooks:
|
|||
raise Exception(CommonProxyErrors.db_not_connected_error.value)
|
||||
if response.user_id is None:
|
||||
raise Exception("no user_id returned for the newly created user")
|
||||
user_row_litellm_typed = await UserRepository(prisma_client).find_by_id(response.user_id)
|
||||
if user_row_litellm_typed is None:
|
||||
user_row = await UserRepository(prisma_client).find_by_id(response.user_id)
|
||||
if user_row is None:
|
||||
raise Exception(f"no user row found for user_id={response.user_id}")
|
||||
asyncio.create_task(
|
||||
UserManagementEventHooks.create_internal_user_audit_log(
|
||||
user_id=user_row_litellm_typed.user_id,
|
||||
user_id=user_row.user_id,
|
||||
action="created",
|
||||
litellm_changed_by=user_api_key_dict.user_id,
|
||||
user_api_key_dict=user_api_key_dict,
|
||||
litellm_proxy_admin_name=litellm_proxy_admin_name,
|
||||
before_value=None,
|
||||
after_value=user_row_litellm_typed.model_dump_json(exclude_none=True),
|
||||
after_value=user_row.model_dump_json(exclude_none=True),
|
||||
)
|
||||
)
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue