Skip to content

Commit 5dd9e10

Browse files
committed
Set the string value in an else block
Signed-off-by: Daniel Widdis <widdis@gmail.com>
1 parent fd61cea commit 5dd9e10

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plugin/src/main/java/org/opensearch/ml/utils/MLNodeUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ public static String processRemoteInferenceInputDataSetParametersValue(String in
116116
JsonNode parsedValue = mapper.readTree(textValue);
117117
// If successful, replace the string with the parsed JSON
118118
parametersNode.set(key, parsedValue);
119+
} else {
120+
parametersNode.set(key, value);
119121
}
120122
} catch (IOException e) {
121123
// If parsing fails, it's not a valid JSON string, so keep it as is

0 commit comments

Comments
 (0)