Fix 'Unable to import service with missing ecompGeneratedNaming in metadata'-bug 80/135980/2
authorvasraz <vasyl.razinkov@est.tech>
Tue, 19 Sep 2023 10:54:13 +0000 (11:54 +0100)
committerMichael Morris <michael.morris@est.tech>
Wed, 20 Sep 2023 08:59:20 +0000 (08:59 +0000)
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Change-Id: I0f775fcf3c3a5e71d0067c3dcd03676ef4aa5f9a
Issue-ID: SDC-4629

catalog-ui/src/app/models/components/service.ts

index 1c7c6b6..5bb42d1 100644 (file)
@@ -198,10 +198,9 @@ export class Service extends Component {
         return 'services/';
     }
 
-
     public setComponentMetadata(componentMetadata: ComponentMetadata) {
         super.setComponentMetadata(componentMetadata);
-        this.ecompGeneratedNaming = componentMetadata.ecompGeneratedNaming;
+        this.ecompGeneratedNaming = componentMetadata.ecompGeneratedNaming != undefined && componentMetadata.ecompGeneratedNaming;
         this.namingPolicy = componentMetadata.namingPolicy;
         this.serviceType = componentMetadata.serviceType;
         this.serviceRole = componentMetadata.serviceRole;