From 79be7239a2d5871ae324c92d8988d405e466abb9 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 3 Apr 2024 18:23:22 -0700 Subject: [PATCH] fix - ui edit keys bug --- ui/litellm-dashboard/src/components/view_key_table.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/litellm-dashboard/src/components/view_key_table.tsx b/ui/litellm-dashboard/src/components/view_key_table.tsx index 6798ea316..e330f7427 100644 --- a/ui/litellm-dashboard/src/components/view_key_table.tsx +++ b/ui/litellm-dashboard/src/components/view_key_table.tsx @@ -63,6 +63,7 @@ interface ItemData { tpm_limit: string | null; rpm_limit: string | null; token: string; + token_id: string | null; id: number; team_id: string; metadata: any; @@ -215,9 +216,12 @@ const ViewKeyTable: React.FC = ({ console.log("handleEditClick:", token); // set token.token to token.token_id if token_id is not null - if (token.token_id !== null) { - token.token = token.token_id; + if (token.token == null) { + if (token.token_id !== null) { + token.token = token.token_id; + } } + setSelectedToken(token); setEditModalVisible(true); };