From 89b4860dbd57fb1a11fc30397a08e316e793572d Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Thu, 18 May 2023 15:15:27 +0100 Subject: Fix error importimg service with custom fns Signed-off-by: MichaelMorris Issue-ID: SDC-4507 Change-Id: I412e411a6d19cfb83d92c0d1184de8a69f75b42f --- .../sdc/be/datatypes/elements/ToscaGetFunctionDataDefinition.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'common-be/src') diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ToscaGetFunctionDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ToscaGetFunctionDataDefinition.java index 0ef417f8e2..9396188fcc 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ToscaGetFunctionDataDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ToscaGetFunctionDataDefinition.java @@ -124,8 +124,9 @@ public class ToscaGetFunctionDataDefinition implements ToscaFunction, ToscaFunct List propertySourceOneCopy = new ArrayList<>(); propertySourceOneCopy.add(this.propertyPathFromSource.get(0)); if (toscaIndex != null) { - propertySourceCopy.add(toscaIndex); - propertySourceOneCopy.add(toscaIndex); + Object toscaIndexValue = StringUtils.isNumeric(toscaIndex.toString()) ? Integer.parseInt(toscaIndex.toString()) : toscaIndex; + propertySourceCopy.add(toscaIndexValue); + propertySourceOneCopy.add(toscaIndexValue); } if (this.propertyPathFromSource.size() == 1) { return Map.of(this.functionType.getFunctionName(), propertySourceOneCopy); -- cgit 1.2.3-korg