mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 00:57:44 +01:00
Fix bug #4819: the scheduled rule can not be removed
When checking the jobs of the rule which are going to be deleted, only get the transfer and delete jobs.
This commit is contained in:
parent
b292c8b05a
commit
e5efa034a8
@ -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