Ensure that CatalogEntity.getName() and CatalogEntity.getId() are always used (#4763)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-01-27 14:42:19 -05:00
1 parent 1cac3ca74c
commit 8d8491a035
17 files changed
+98 -166

No files matched your search

+1 -1
View File
@@ -36,7 +36,7 @@ export class CatalogEntityRegistry {
}
getById<T extends CatalogEntity>(id: string): T | undefined {
return this.items.find((entity) => entity.metadata.uid === id) as T | undefined;
return this.items.find(entity => entity.getId() === id) as T | undefined;
}
getItemsForApiKind<T extends CatalogEntity>(apiVersion: string, kind: string): T[] {