mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-28 21:37:31 +02: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{
|
count, err := dao.GetTotalCountOfRepJobs(&models.RepJobQuery{
|
||||||
PolicyID: id,
|
PolicyID: id,
|
||||||
Statuses: []string{models.JobRunning, models.JobRetrying, models.JobPending},
|
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 {
|
if err != nil {
|
||||||
log.Errorf("failed to filter jobs of policy %d: %v", id, err)
|
log.Errorf("failed to filter jobs of policy %d: %v", id, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user