mirror of
https://github.com/goharbor/harbor
synced 2024-09-21 02:29:54 +00:00
Merge pull request #14452 from ywk253100/210315_duplicated_task
Add order by ID when listing tasks to avoid duplicated records
This commit is contained in:
commit
f4655bbacd
|
@ -76,7 +76,7 @@ func (t *taskDAO) List(ctx context.Context, query *q.Query) ([]*Task, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
qs = qs.OrderBy("-StartTime")
|
||||
qs = qs.OrderBy("-StartTime", "ID")
|
||||
if _, err = qs.All(&tasks); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user