Merge pull request #8708 from bitsf/tag_retention_rule_conflict

fix rule conflict, id error
This commit is contained in:
Steven Zou 2019-08-20 16:45:21 +08:00 committed by GitHub
commit f6067d5474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -238,7 +238,7 @@ func (r *RetentionAPI) checkRuleConflict(p *policy.Metadata) error {
if old, exists := temp[string(bs)]; exists {
return fmt.Errorf("rule %d is conflict with rule %d", n, old)
}
temp[string(bs)] = tid
temp[string(bs)] = n
rule.ID = tid
}
return nil