mirror of
https://github.com/goharbor/harbor
synced 2025-04-15 20:30:36 +00:00
Merge pull request #4038 from ywk253100/180116_bug_fix
Fix bug: checking whether the status is null when listing replication jobs
This commit is contained in:
commit
45894de89a
|
@ -108,7 +108,11 @@ func (ra *RepJobAPI) List() {
|
||||||
|
|
||||||
page, pageSize := ra.GetPaginationParams()
|
page, pageSize := ra.GetPaginationParams()
|
||||||
|
|
||||||
jobs, total, err := dao.FilterRepJobs(policyID, repository, []string{status},
|
statuses := []string{}
|
||||||
|
if len(status) > 0 {
|
||||||
|
statuses = append(statuses, status)
|
||||||
|
}
|
||||||
|
jobs, total, err := dao.FilterRepJobs(policyID, repository, statuses,
|
||||||
startTime, endTime, pageSize, pageSize*(page-1))
|
startTime, endTime, pageSize, pageSize*(page-1))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("failed to filter jobs according policy ID %d, repository %s, status %s, start time %v, end time %v: %v",
|
log.Errorf("failed to filter jobs according policy ID %d, repository %s, status %s, start time %v, end time %v: %v",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user