Skip to content

Commit

Permalink
Merge pull request goharbor#9703 from jwangyangls/fix-replication-nam…
Browse files Browse the repository at this point in the history
…e-conflict

Fix a bug that when someone edits a rule with same name ,it displays the name is already in use
  • Loading branch information
jwangyangls authored Nov 4, 2019
2 parents 184ba9f + 92cac6f commit 473b453
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {
this.inNameChecking = true;
this.repService.getReplicationRules(0, ruleName)
.subscribe(response => {
if (response.some(rule => rule.name === ruleName)) {
if (response.some(rule => (rule.name === ruleName && rule.id !== this.policyId))) {
this.ruleNameTooltip = "TOOLTIP.RULE_USER_EXISTING";
this.isRuleNameValid = false;
}
Expand Down

0 comments on commit 473b453

Please sign in to comment.