mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-06 11:08:11 +02:00
Merge pull request #536 from ywk253100/bug_fix_for_trigger_disabled_policy
Do not trigger replication if the policy is disabled
This commit is contained in:
commit
8226704032
@ -162,6 +162,9 @@ func TriggerReplicationByRepository(repository string, tags []string, operation
|
||||
}
|
||||
|
||||
for _, policy := range policies {
|
||||
if policy.Enabled == 0 {
|
||||
continue
|
||||
}
|
||||
if err := TriggerReplication(policy.ID, repository, tags, operation); err != nil {
|
||||
log.Errorf("failed to trigger replication of policy %d for %s: %v", policy.ID, repository, err)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user