Skip to content

Commit 13c5fbb

Browse files
committed
fix(ui): send null when clearing key organization
Clearing the organization picker set the field to undefined, which JSON.stringify drops so /key/update never received a clear and the stored organization stayed attached. Send null instead so the server clears it.
1 parent 97108fa commit 13c5fbb

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎ui/litellm-dashboard/src/components/templates/key_edit_view.tsx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,11 @@ export function KeyEditView({
303303
}
304304
};
305305

306-
const handleOrganizationChange = (setField: (value: string | undefined) => void, orgId: string | undefined) => {
307-
setField(orgId || undefined);
306+
const handleOrganizationChange = (
307+
setField: (value: string | null | undefined) => void,
308+
orgId: string | undefined,
309+
) => {
310+
setField(orgId || null);
308311
setSelectedOrganizationId(orgId || null);
309312
form.setValue("team_id", undefined);
310313
};

0 commit comments

Comments
 (0)