Commit 8a2d5b05 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

commit

parent b6a83272
......@@ -67,7 +67,8 @@ func (s *wafService) CreateWaf(ctx context.Context, req *CreateWafReq) (*Waf, er
// Determine which rule categories to enable
var enabledCategories []model.WafRuleCategory
if len(wafService.RuleCategoryStatus.CategoryID) > 0 {
if wafService.RuleCategoryStatus != nil && len(wafService.RuleCategoryStatus.CategoryID) > 0 {
// Only include categories not already enabled
for _, category := range ruleCategories {
if !slices.Contains(wafService.RuleCategoryStatus.CategoryID, category.CategoryID) {
......
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