Skip to content

Commit

Permalink
Sort on ID rather than CreateTime for consistency
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Lucidi <[email protected]>
  • Loading branch information
mansam committed Oct 23, 2023
1 parent 5325af0 commit f3a63df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ func (r *Application) With(m *model.Application, tags []model.ApplicationTag) {

if len(m.Analyses) > 0 {
sort.Slice(m.Analyses, func(i, j int) bool {
return m.Analyses[i].CreateTime.Before(m.Analyses[j].CreateTime)
return m.Analyses[i].ID < m.Analyses[j].ID
})
r.Effort = m.Analyses[len(m.Analyses)-1].Effort
}
Expand Down

0 comments on commit f3a63df

Please sign in to comment.