@@ -287,19 +287,21 @@ def _enrich(self, enrichments, results, audit_enabled=True):
287
287
"audit_enabled" : audit_enabled ,
288
288
}
289
289
290
- # enrich the alert with _enrichments
291
- enrichments_bl .enrich_entity (
292
- enrichments = _enrichments ,
293
- action_description = f"Workflow enriched the alert with { enrichment_string } " ,
294
- ** common_kwargs ,
295
- )
290
+ if _enrichments :
291
+ # enrich the alert with _enrichments
292
+ enrichments_bl .enrich_entity (
293
+ enrichments = _enrichments ,
294
+ action_description = f"Workflow enriched the alert with { enrichment_string } " ,
295
+ ** common_kwargs ,
296
+ )
296
297
297
- # enrich with disposable enrichments
298
- enrichments_bl .disposable_enrich_entity (
299
- enrichments = disposable_enrichments ,
300
- action_description = f"Workflow enriched the alert with { disposable_enrichment_string } " ,
301
- ** common_kwargs ,
302
- )
298
+ if disposable_enrichments :
299
+ # enrich with disposable enrichments
300
+ enrichments_bl .disposable_enrich_entity (
301
+ enrichments = disposable_enrichments ,
302
+ action_description = f"Workflow enriched the alert with { disposable_enrichment_string } " ,
303
+ ** common_kwargs ,
304
+ )
303
305
304
306
should_check_incidents_resolution = (
305
307
_enrichments .get ("status" , None ) == "resolved"
0 commit comments