Skip to content

Commit 9a28459

Browse files
update comments
1 parent 1d03fd6 commit 9a28459

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

dojo/finding/deduplication.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -697,9 +697,7 @@ def _flush_duplicate_changes(modified_new_findings):
697697
Persist duplicate field changes collected during a batch deduplication run.
698698
699699
Bulk-updates all modified new findings in one round-trip instead of one
700-
save() call per finding. Uses bulk_update (no signals) which is consistent
701-
with the original code that called super(Finding, ...).save(skip_validation=True),
702-
bypassing Finding.save() in both cases.
700+
save() call per finding. Uses bulk_update to bypass Django signals.
703701
704702
Returns the list of modified findings so callers can perform any follow-up
705703
processing (e.g. triggering prioritization) on the affected findings.
@@ -1014,8 +1012,7 @@ def do_false_positive_history_batch(findings):
10141012
len(to_mark_as_fp_ids),
10151013
sorted(to_mark_as_fp_ids),
10161014
)
1017-
# QuerySet.update() bypasses Django signals — intentional, mimicking the previous
1018-
# super(Finding, find).save(skip_validation=True) calls that also skipped all post-save processing.
1015+
# QuerySet.update() bypasses Django signals — intentional as this code is called during (post) save processing.
10191016
# Note: .only() does not constrain update() — Django generates the UPDATE SQL independently.
10201017
Finding.objects.filter(id__in=to_mark_as_fp_ids).update(false_p=True, active=False, verified=False)
10211018

0 commit comments

Comments
 (0)