Merge branch 'feature/validate-group-association' into feature/validate-group-association-debug

This commit is contained in:
bcmmbaga
2024-10-21 17:12:42 +03:00
5 changed files with 31 additions and 4 deletions
+4
View File
@@ -463,6 +463,10 @@ func (am *DefaultAccountManager) savePolicy(account *Account, policyToSave *Poli
}
oldPolicy := account.Policies[policyIdx]
if !policyToSave.Enabled && !oldPolicy.Enabled {
return false, nil
}
updateAccountPeers := anyGroupHasPeers(account, oldPolicy.ruleGroups()) || anyGroupHasPeers(account, policyToSave.ruleGroups())
// Update the existing policy