mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 22:57:38 +01:00
Fix a bug that when someone edits a rule with same name ,it displays the name is already in use
Signed-off-by: Yogi_Wang <yawang@vmware.com>
This commit is contained in:
parent
2101d7125c
commit
92cac6fd35
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user