Fix correctly assign input and output IDs to progress data for report history

This commit is contained in:
Ingo Oppermann
2025-03-17 12:11:00 +01:00
parent 19479201b4
commit 9c42156a38

View File

@@ -337,21 +337,8 @@ func (t *task) Report() (*app.Report, error) {
report.History[i].UnmarshalParser(&h)
e := &report.History[i]
for i, p := range e.Progress.Input {
if int(p.Index) >= len(t.process.Config.Input) {
continue
}
e.Progress.Input[i].ID = t.process.Config.Input[p.Index].ID
}
for i, p := range e.Progress.Output {
if int(p.Index) >= len(t.process.Config.Output) {
continue
}
e.Progress.Output[i].ID = t.process.Config.Output[p.Index].ID
}
e.Progress.Input = assignConfigID(e.Progress.Input, t.process.Config.Input)
e.Progress.Output = assignConfigID(e.Progress.Output, t.process.Config.Input)
}
return report, nil