mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-04 17:49:48 +01: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()
|
||||
|
||||
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))
|
||||
if err != nil {
|
||||
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