summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java1
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts11
2 files changed, 7 insertions, 5 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java
index 3252d79281..0e9c44a382 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/Component.java
@@ -90,7 +90,6 @@ public abstract class Component implements PropertiesOwner {
private Map<String, InterfaceDefinition> interfaces;
private List<DataTypeDefinition> dataTypes;
private SubstitutionFilterDataDefinition substitutionFilter;
- private String model;
protected Component(ComponentMetadataDefinition componentMetadataDefinition) {
this.componentMetadataDefinition = componentMetadataDefinition;
diff --git a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts
index 2d029cd332..a1acfc73fa 100644
--- a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts
+++ b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts
@@ -536,15 +536,16 @@ export class GeneralViewModel {
return;
}
- if (!this.$scope.isCreateMode() && this.$scope.isVspImport()){
+ if (!this.$scope.isCreateMode() && this.$scope.isVspImport()) {
this.modelService.getModels().subscribe((modelsFound: Model[]) => {
modelsFound.sort().forEach(model => {
if (this.$scope.component.model != undefined) {
if (model.modelType == "NORMATIVE_EXTENSION") {
- this.$scope.component.model = model.derivedFrom;
+ if (this.$scope.component.model === model.name) {
+ this.$scope.component.model = model.derivedFrom;
+ }
this.$scope.models.push(model.derivedFrom)
} else {
- this.$scope.component.model = model.name;
this.$scope.models.push(model.name)
}
}
@@ -552,7 +553,9 @@ export class GeneralViewModel {
});
} else {
this.modelService.getModelsOfType("normative").subscribe((modelsFound: Model[]) => {
- modelsFound.sort().forEach(model => {this.$scope.models.push(model.name)});
+ modelsFound.sort().forEach(model => {
+ this.$scope.models.push(model.name)
+ });
});
}
};