Merge pull request #546 from ywk253100/order_jobs_by_update_time

Order jobs by update time
This commit is contained in:
Daniel Jiang 2016-07-14 19:58:13 +08:00 committed by GitHub
commit 18e5251784

View File

@ -342,7 +342,7 @@ func FilterRepJobs(policyID int64, repository, status string, startTime,
qs = qs.Limit(limit) qs = qs.Limit(limit)
} }
qs = qs.OrderBy("-CreationTime") qs = qs.OrderBy("-UpdateTime")
var jobs []*models.RepJob var jobs []*models.RepJob
_, err := qs.All(&jobs) _, err := qs.All(&jobs)