@@ -470,22 +470,30 @@ def post_process_finding_save_internal(finding, dedupe_option=True, rules_option
470470@app .task
471471def post_process_findings_batch_signature (finding_ids , * args , dedupe_option = True , rules_option = True , product_grading_option = True ,
472472 issue_updater_option = True , push_to_jira = False , user = None , ** kwargs ):
473- return post_process_findings_batch (finding_ids , dedupe_option , rules_option , product_grading_option ,
474- issue_updater_option , push_to_jira , user , ** kwargs )
473+ return post_process_findings_batch (finding_ids , * args , dedupe_option = dedupe_option , rules_option = rules_option , product_grading_option = product_grading_option , issue_updater_option = issue_updater_option , push_to_jira = push_to_jira , user = user , ** kwargs )
474+ # Pass arguments as keyword arguments to ensure Celery properly serializes them
475475
476476
477477@dojo_async_task
478478@app .task
479479def post_process_findings_batch (finding_ids , * args , dedupe_option = True , rules_option = True , product_grading_option = True ,
480480 issue_updater_option = True , push_to_jira = False , user = None , ** kwargs ):
481481
482+ logger .debug (
483+ f"post_process_findings_batch called: finding_ids_count={ len (finding_ids ) if finding_ids else 0 } , "
484+ f"args={ args } , dedupe_option={ dedupe_option } , rules_option={ rules_option } , "
485+ f"product_grading_option={ product_grading_option } , issue_updater_option={ issue_updater_option } , "
486+ f"push_to_jira={ push_to_jira } , user={ user .id if user else None } , kwargs={ kwargs } " ,
487+ )
482488 if not finding_ids :
483489 return
484490
485491 system_settings = System_Settings .objects .get ()
486492
487493 # use list() to force a complete query execution and related objects to be loaded once
494+ logger .debug (f"getting finding models for batch deduplication with: { len (finding_ids )} findings" )
488495 findings = get_finding_models_for_deduplication (finding_ids )
496+ logger .debug (f"found { len (findings )} findings for batch deduplication" )
489497
490498 if not findings :
491499 logger .debug (f"no findings found for batch deduplication with IDs: { finding_ids } " )
@@ -517,6 +525,8 @@ def post_process_findings_batch(finding_ids, *args, dedupe_option=True, rules_op
517525 jira_helper .push_to_jira (finding )
518526 else :
519527 jira_helper .push_to_jira (finding .finding_group )
528+ else :
529+ logger .debug ("push_to_jira is False, not ushing to JIRA" )
520530
521531
522532@receiver (pre_delete , sender = Finding )
0 commit comments