mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-02 16:49:48 +01: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