File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -137,18 +137,16 @@ func formatListWorkflowsResponseBody(wf WorkflowStatus) listWorkflowsConductorRe
137137 }
138138 }
139139
140- // Convert input/output to JSON strings if present
140+ // input/output are already JSON strings
141141 if wf .Input != nil {
142- inputJSON , err := json .Marshal (wf .Input )
143- if err == nil {
144- inputStr := string (inputJSON )
142+ inputStr , ok := wf .Input .(string )
143+ if ok {
145144 output .Input = & inputStr
146145 }
147146 }
148147 if wf .Output != nil {
149- outputJSON , err := json .Marshal (wf .Output )
150- if err == nil {
151- outputStr := string (outputJSON )
148+ outputStr , ok := wf .Output .(string )
149+ if ok {
152150 output .Output = & outputStr
153151 }
154152 }
@@ -249,11 +247,10 @@ func formatWorkflowStepsResponseBody(step StepInfo) workflowStepsConductorRespon
249247 FunctionName : step .StepName ,
250248 }
251249
252- // Convert output to JSON string if present
250+ // output is already a JSON string
253251 if step .Output != nil {
254- outputJSON , err := json .Marshal (step .Output )
255- if err == nil {
256- outputStr := string (outputJSON )
252+ outputStr , ok := step .Output .(string )
253+ if ok {
257254 output .Output = & outputStr
258255 }
259256 }
You can’t perform that action at this time.
0 commit comments