From 5f7a55f76afdfd043435a66523fbd1c8db0e32bd Mon Sep 17 00:00:00 2001 From: Saksham-Nautiyal <167847889+Saksham-Nautiyal@users.noreply.github.com> Date: Wed, 19 Feb 2025 12:05:10 +0530 Subject: [PATCH] alert_rule_reg_fix (#159) * alert_rule_reg_fix * incorporated review comments --- plugins/modules/alert_rule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/alert_rule.py b/plugins/modules/alert_rule.py index c4f19c1..18050fe 100644 --- a/plugins/modules/alert_rule.py +++ b/plugins/modules/alert_rule.py @@ -316,7 +316,7 @@ def get_module_params(self, module_params): def process_categories(self, module_params, alert_data): categories = module_params.get('categories', []) - if "all" in categories: + if categories and "all" in categories: alert_data["categories"] = ["all"] return alert_data