Skip to content

Commit

Permalink
Merge pull request #2724 from headlamp-k8s/fix-missing-apiversion
Browse files Browse the repository at this point in the history
frontend: Put apiVersion for individual items from list when fetching
  • Loading branch information
sniok authored Jan 3, 2025
2 parents 69d4e12 + f9bc289 commit fe2966a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/lib/k8s/api/v2/useKubeObjectList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ export function kubeObjectListQuery<K extends KubeObject>(
}
).then(it => it.json());
list.items = list.items.map(item => {
const itm = new kubeObjectClass({ ...item, kind: list.kind.replace('List', '') });
const itm = new kubeObjectClass({
...item,
kind: list.kind.replace('List', ''),
apiVersion: list.apiVersion,
});
itm.cluster = cluster;
return itm;
});
Expand Down

0 comments on commit fe2966a

Please sign in to comment.