diff --git a/dojo/models.py b/dojo/models.py index aadd28bbc6f..201b1619ffe 100644 --- a/dojo/models.py +++ b/dojo/models.py @@ -3485,15 +3485,16 @@ def violates_sla(self): def set_hash_code(self, dedupe_option): from dojo.utils import get_custom_method # noqa: PLC0415 circular import if hash_method := get_custom_method("FINDING_HASH_METHOD"): + deduplicationLogger.debug("Using custom hash method") hash_method(self, dedupe_option) # 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 # It is then called a second time with dedupe_option defaulted to true; now we can compute the hash_code and run the deduplication elif dedupe_option: if self.hash_code is not None: - deduplicationLogger.debug("Hash_code already computed for finding") + deduplicationLogger.debug("Hash_code already computed for finding %i", self.id) else: self.hash_code = self.compute_hash_code() - deduplicationLogger.debug("Hash_code computed for finding: %s", self.hash_code) + deduplicationLogger.debug("Hash_code computed for finding %i: %s", self.id, self.hash_code) class FindingAdmin(admin.ModelAdmin):