summaryrefslogtreecommitdiffstats
path: root/catalog-ui
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2023-08-18 19:40:44 +0100
committerJEFF VAN DAM <jeff.van.dam@est.tech>2023-08-21 14:55:31 +0000
commitfda41360dcb7e68c8e3003c73fdb98db2514bf5f (patch)
tree807aaed239a38f75af88374bc7a40ec114090ab9 /catalog-ui
parentd32437595314c9b5b2aa439a482d0b07286a8072 (diff)
Fix 'Fail to import service with CP'-bug
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Change-Id: I7261b03eb7e796aaa66ac3dbd0116bc62d2d6e71 Issue-ID: SDC-4599
Diffstat (limited to 'catalog-ui')
-rw-r--r--catalog-ui/src/app/utils/service-csar-reader.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/catalog-ui/src/app/utils/service-csar-reader.ts b/catalog-ui/src/app/utils/service-csar-reader.ts
index 20dfe6ca6b..4c9b0cd0ca 100644
--- a/catalog-ui/src/app/utils/service-csar-reader.ts
+++ b/catalog-ui/src/app/utils/service-csar-reader.ts
@@ -82,7 +82,10 @@ export class ServiceCsarReader {
}
private readSubstitutionNodeFromMainTemplateFile(entryDefinitionFileContent) {
- this.serviceCsar.substitutionNodeType = load(entryDefinitionFileContent).topology_template.substitution_mappings.node_type;
+ const loadEntryDefinitionFileContent = load(entryDefinitionFileContent);
+ if (loadEntryDefinitionFileContent.topology_template && loadEntryDefinitionFileContent.topology_template.substitution_mappings) {
+ this.serviceCsar.substitutionNodeType = loadEntryDefinitionFileContent.topology_template.substitution_mappings.node_type;
+ }
}
private setMetadata = (metadata:object) : void => {
@@ -147,4 +150,4 @@ export class ServiceCsarReader {
});
this.serviceCsar.extraServiceMetadata = extraServiceMetadata;
}
-} \ No newline at end of file
+}