From 1f240151bfac463eb1f5c1df1f497eed8495106e Mon Sep 17 00:00:00 2001 From: "andre.schmid" Date: Fri, 10 Jun 2022 11:39:07 +0100 Subject: Fix component workspace metadata not being set The component metadata was not being initialized when the Component constructor was being used. Also, during the component checkout, instead of setting the ComponentMetadata to the workspaceService, the code was setting the component itself, causing issues in functionalities that uses the metadata after a component checkout. Change-Id: Ie9bb187ea04a2f4711d4df00ea335d531840378e Issue-ID: SDC-4046 Signed-off-by: andre.schmid --- catalog-ui/src/app/view-models/workspace/workspace-view-model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'catalog-ui/src/app/view-models/workspace') diff --git a/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts b/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts index 532df0e2f9..7bed071d7e 100644 --- a/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/workspace-view-model.ts @@ -568,7 +568,7 @@ export class WorkspaceViewModel { this.initVersionObject(); this.$scope.isLoading = false; this.EventListenerService.notifyObservers(EVENTS.ON_CHECKOUT, component); - this.workspaceService.setComponentMetadata(component); + this.workspaceService.setComponentMetadata(component.componentMetadata); this.Notification.success({ message: this.$filter('translate')("CHECKOUT_SUCCESS_MESSAGE_TEXT"), -- cgit 1.2.3-korg