Skip to content

Commit 2aaca49

Browse files
docs: cite #12291 for close_old_findings status refresh origin
1 parent b8d86e7 commit 2aaca49

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

dojo/importers/default_reimporter.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,10 @@ def _sync_close_old_finding_status_fields(self, findings: list[Finding]) -> None
469469
Refresh false_p, risk_accepted, and out_of_scope from the DB for each finding.
470470
471471
These can change during reimport (e.g. false positive) while the in-memory instances
472-
are stale. A naive refresh_from_db per finding issues one SELECT each; we batch one
473-
query for all primary keys and fall back to refresh_from_db only when needed.
472+
are stale. Per-finding refresh_from_db in close_old_findings was added in
473+
https://github.com/DefectDojo/django-DefectDojo/pull/12291. A naive refresh per
474+
finding issues one SELECT each; we batch one query for all primary keys and fall
475+
back to refresh_from_db only when needed.
474476
"""
475477
ids = [f.pk for f in findings if f.pk is not None]
476478
if not ids:
@@ -515,7 +517,7 @@ def close_old_findings(
515517
# reimport makes this change in the database. However, the findings here
516518
# are calculated based from the original values before the reimport, so
517519
# any updates made during reimport are discarded without first getting the
518-
# state of the finding as it stands at this moment
520+
# state of the finding as it stands at this moment (django-DefectDojo #12291).
519521
self._sync_close_old_finding_status_fields(findings)
520522
# Determine if pushing to jira or if the finding groups are enabled
521523
mitigated_findings = []

0 commit comments

Comments
 (0)