Commit 28753112 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

fix update rules

parent a35ee271
...@@ -718,7 +718,7 @@ func (s *wafService) calculateCrdWafRules(ctx context.Context, req *RuleRequest, ...@@ -718,7 +718,7 @@ func (s *wafService) calculateCrdWafRules(ctx context.Context, req *RuleRequest,
// Determine which rule categories to enable // Determine which rule categories to enable
var enabledCategories []model.WafRuleCategory var enabledCategories []model.WafRuleCategory
if wafService.RuleCategoryStatus != nil && len(wafService.RuleCategoryStatus.CategoryID) == 1 { if wafService.RuleCategoryStatus != nil && len(wafService.RuleCategoryStatus.CategoryID) >= 1 {
// Only include categories not already enabled // Only include categories not already enabled
for _, category := range ruleCategories { for _, category := range ruleCategories {
if s.isCategoryEnabled(category.CategoryID, wafService.RuleCategoryStatus) { if s.isCategoryEnabled(category.CategoryID, wafService.RuleCategoryStatus) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment