aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui')
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts
index 8c983b61b8..4eefbcb467 100644
--- a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts
+++ b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts
@@ -22,7 +22,7 @@ import {ComponentMetadata, DataTypeModel, PropertyBEModel, PropertyModel} from '
import {TopologyTemplateService} from "../../../services/component-services/topology-template.service";
import {WorkspaceService} from "../../workspace/workspace.service";
import {PropertiesService} from "../../../services/properties.service";
-import {PROPERTY_DATA} from "../../../../utils/constants";
+import {PROPERTY_DATA, PROPERTY_TYPES} from "../../../../utils/constants";
import {DataTypeService} from "../../../services/data-type.service";
import {ToscaGetFunctionType} from "../../../../models/tosca-get-function-type";
import {TranslateService} from "../../../shared/translator/translate.service";
@@ -335,12 +335,13 @@ export class ToscaFunctionComponent implements OnInit {
}
private hasSameType(property: PropertyBEModel) {
- if (this.property.schema && this.property.schema.property) {
+ if (this.typeHasSchema(this.property.type)) {
if (!property.schema || !property.schema.property) {
return false;
}
return property.type === this.property.type && this.property.schema.property.type === property.schema.property.type;
}
+
return property.type === this.property.type;
}
@@ -356,6 +357,10 @@ export class ToscaFunctionComponent implements OnInit {
return PROPERTY_DATA.SIMPLE_TYPES.indexOf(propertyType) === -1;
}
+ private typeHasSchema(propertyType: string): boolean {
+ return PROPERTY_TYPES.MAP === propertyType || PROPERTY_TYPES.LIST === propertyType;
+ }
+
private stopLoading(): void {
this.isLoading = false;
}