prevent duplicate rules during updates

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
This commit is contained in:
bcmmbaga
2024-11-18 22:48:38 +03:00
parent df98c67ac8
commit b60e2c3261
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ func (h *Policies) savePolicy(w http.ResponseWriter, r *http.Request, accountID
Description: req.Description,
}
for _, rule := range req.Rules {
ruleID := policyID // TODO: when policy can contain multiple rules, need refactor
var ruleID string
if rule.Id != nil {
ruleID = *rule.Id
}