mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 18:25:56 +01:00
Fix bug: checking whether the status is null when listing replication jobs
This commit is contained in:
parent
8cda2d8d65
commit
7ebcc82516
@ -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