mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-11 18:38:14 +01:00
Merge pull request #5924 from cd1989/replication-status-check
Fix statuses condition when trigger replication
This commit is contained in:
commit
0ebed68f5b
@ -64,8 +64,9 @@ func (r *ReplicationAPI) Post() {
|
||||
}
|
||||
|
||||
count, err := dao.GetTotalCountOfRepJobs(&models.RepJobQuery{
|
||||
PolicyID: replication.PolicyID,
|
||||
Statuses: []string{models.RepOpTransfer, models.RepOpDelete},
|
||||
PolicyID: replication.PolicyID,
|
||||
Statuses: []string{models.JobPending, models.JobRunning},
|
||||
Operations: []string{models.RepOpTransfer, models.RepOpDelete},
|
||||
})
|
||||
if err != nil {
|
||||
r.HandleInternalServerError(fmt.Sprintf("failed to filter jobs of policy %d: %v",
|
||||
|
Loading…
Reference in New Issue
Block a user