Rimuovi MultiFileUpload dagli input e dall'execSharedMap se presente
This commit is contained in:
@@ -629,10 +629,32 @@ public class ScenarioExecutionService {
|
||||
}else {
|
||||
pageable = PageRequest.of(page, size, Sort.by(Sort.Direction.ASC, sortField));
|
||||
}
|
||||
|
||||
query.fields().exclude("execSharedMap");
|
||||
query.with(pageable);
|
||||
|
||||
List<ScenarioExecution> results = mongoTemplate.find(query, ScenarioExecution.class);
|
||||
|
||||
// Remove MultiFileUpload from inputs if present
|
||||
results.forEach(execution -> {
|
||||
if (execution.getScenarioExecutionInput() != null &&
|
||||
execution.getScenarioExecutionInput().getInputs() != null &&
|
||||
execution.getScenarioExecutionInput().getInputs().containsKey("MultiFileUpload")) {
|
||||
|
||||
execution.getScenarioExecutionInput().getInputs().put("MultiFileUpload", null);
|
||||
// Also remove from execSharedMap if it exists
|
||||
if (execution.getExecSharedMap() != null &&
|
||||
execution.getExecSharedMap().get("user_input") != null) {
|
||||
|
||||
HashMap<String, String> userInput = (HashMap<String, String>) execution.getExecSharedMap().get("user_input");
|
||||
if (userInput.containsKey("MultiFileUpload")) {
|
||||
userInput.put("MultiFileUpload", null);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return new PageImpl<>(results, pageable, count);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user