Skip to content

Commit 6d79d2d

Browse files
author
Valentijn Scholten
committed
log a line when custom hash method is used
1 parent b1ff550 commit 6d79d2d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

dojo/models.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3485,15 +3485,16 @@ def violates_sla(self):
34853485
def set_hash_code(self, dedupe_option):
34863486
from dojo.utils import get_custom_method # noqa: PLC0415 circular import
34873487
if hash_method := get_custom_method("FINDING_HASH_METHOD"):
3488+
deduplicationLogger.debug("Using custom hash method")
34883489
hash_method(self, dedupe_option)
34893490
# Finding.save is called once from serializers.py with dedupe_option=False because the finding is not ready yet, for example the endpoints are not built
34903491
# It is then called a second time with dedupe_option defaulted to true; now we can compute the hash_code and run the deduplication
34913492
elif dedupe_option:
34923493
if self.hash_code is not None:
3493-
deduplicationLogger.debug("Hash_code already computed for finding")
3494+
deduplicationLogger.debug("Hash_code already computed for finding %i", self.id)
34943495
else:
34953496
self.hash_code = self.compute_hash_code()
3496-
deduplicationLogger.debug("Hash_code computed for finding: %s", self.hash_code)
3497+
deduplicationLogger.debug("Hash_code computed for finding %i: %s", self.id, self.hash_code)
34973498

34983499

34993500
class FindingAdmin(admin.ModelAdmin):

0 commit comments

Comments
 (0)