Fix remaining org_id fallbacks in filter_helpers and TeamVirtualKeysTable

filter_helpers.ts was not populating the Organization ID filter dropdown
(always empty). TeamVirtualKeysTable was showing the team's org for all
keys instead of each key's own org.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
yuneng-jiang 2026-03-04 20:18:54 -08:00
parent 51d876ce79
commit 7eafac8e7f
2 changed files with 2 additions and 2 deletions

View file

@ -22,7 +22,7 @@ const processKeysIntoOptions = (
if (alias && typeof alias === "string") {
keyAliases.add(alias.trim());
}
const orgId = key?.organization_id;
const orgId = key?.organization_id ?? key?.org_id;
if (orgId && typeof orgId === "string") {
organizationIds.add(orgId.trim());
}

View file

@ -91,7 +91,7 @@ export function TeamVirtualKeysTable({ teamId, teamAlias, organization }: TeamVi
if (!orgId) return kList;
return kList.map((k: KeyResponse) => ({
...k,
organization_id: k.organization_id || orgId,
organization_id: (k.organization_id ?? k.org_id) || orgId,
}));
}, [keys?.keys, organization?.organization_id]);