aboutsummaryrefslogtreecommitdiffstats
path: root/common-be/src/main
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2023-05-18 15:15:27 +0100
committerMichaelMorris <michael.morris@est.tech>2023-05-18 15:15:31 +0100
commit89b4860dbd57fb1a11fc30397a08e316e793572d (patch)
tree947f2898b247eae74864ff86bdf3ae0fa75dfa38 /common-be/src/main
parentbc7dd3ad94acace55a2910abc22cc5cb64e0862d (diff)
Fix error importimg service with custom fns
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-4507 Change-Id: I412e411a6d19cfb83d92c0d1184de8a69f75b42f
Diffstat (limited to 'common-be/src/main')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ToscaGetFunctionDataDefinition.java5
1 files changed, 3 insertions, 2 deletions
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<Object> 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);