mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-24 07:41:40 +01:00
Merge pull request #4823 from ywk253100/180430_delete_rule_cherrypick
Cherry pick: Fix bug #4819: the scheduled rule can not be removed
This commit is contained in:
commit
696c39350e
@ -252,6 +252,8 @@ func (pa *RepPolicyAPI) Delete() {
|
||||
count, err := dao.GetTotalCountOfRepJobs(&models.RepJobQuery{
|
||||
PolicyID: id,
|
||||
Statuses: []string{models.JobRunning, models.JobRetrying, models.JobPending},
|
||||
// only get the transfer and delete jobs, do not get schedule job
|
||||
Operations: []string{models.RepOpTransfer, models.RepOpDelete},
|
||||
})
|
||||
if err != nil {
|
||||
log.Errorf("failed to filter jobs of policy %d: %v", id, err)
|
||||
|
Loading…
Reference in New Issue
Block a user