mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-20 15:48:26 +01:00
Merge pull request #8708 from bitsf/tag_retention_rule_conflict
fix rule conflict, id error
This commit is contained in:
commit
f6067d5474
@ -238,7 +238,7 @@ func (r *RetentionAPI) checkRuleConflict(p *policy.Metadata) error {
|
|||||||
if old, exists := temp[string(bs)]; exists {
|
if old, exists := temp[string(bs)]; exists {
|
||||||
return fmt.Errorf("rule %d is conflict with rule %d", n, old)
|
return fmt.Errorf("rule %d is conflict with rule %d", n, old)
|
||||||
}
|
}
|
||||||
temp[string(bs)] = tid
|
temp[string(bs)] = n
|
||||||
rule.ID = tid
|
rule.ID = tid
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user