From d32437595314c9b5b2aa439a482d0b07286a8072 Mon Sep 17 00:00:00 2001 From: franciscovila Date: Tue, 27 Jun 2023 11:20:23 +0100 Subject: Custom tosca functions with valid_values and in_range operators not showing properly Issue-ID: SDC-4554 Signed-off-by: franciscovila Change-Id: I8c6ad232951d887593a15562b11c03d8613be29b --- .../properties-assignment/tosca-function/tosca-function.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'catalog-ui/src/app/ng2/pages/properties-assignment') 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 66ae3cc23c..412e29a427 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 @@ -167,9 +167,9 @@ export class ToscaFunctionComponent implements OnInit, OnChanges { } this.toscaFunctionForm.setValue(this.inToscaFunction ? this.inToscaFunction : this.property.toscaFunction); - let type = this.property.toscaFunction.type; + let type = this.property.toscaFunction.type ? this.property.toscaFunction.type : this.toscaFunctionForm.value.type; if (type == ToscaFunctionType.CUSTOM) { - let name = (this.property.toscaFunction as ToscaCustomFunction).name; + let name = (this.toscaFunctionForm.value as ToscaCustomFunction).name; let customToscaFunc = this.customToscaFunctions.find(custToscFunc => _.isEqual(custToscFunc.name, name)) if (customToscaFunc) { this.toscaFunctionTypeForm.setValue(name); -- cgit 1.2.3-korg