Skip to content

Commit 7206be7

Browse files
fix logger NoneType
1 parent ee9ee74 commit 7206be7

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
@@ -3505,11 +3505,12 @@ def set_hash_code(self, dedupe_option):
35053505
# 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
35063506
# It is then called a second time with dedupe_option defaulted to true; now we can compute the hash_code and run the deduplication
35073507
elif dedupe_option:
3508+
finding_id = self.id if self.id is not None else "unsaved"
35083509
if self.hash_code is not None:
3509-
deduplicationLogger.debug("Hash_code already computed for finding %i", self.id)
3510+
deduplicationLogger.debug("Hash_code already computed for finding: %s", finding_id)
35103511
else:
35113512
self.hash_code = self.compute_hash_code()
3512-
deduplicationLogger.debug("Hash_code computed for finding %i: %s", self.id, self.hash_code)
3513+
deduplicationLogger.debug("Hash_code computed for finding: %s: %s", finding_id, self.hash_code)
35133514

35143515

35153516
class FindingAdmin(admin.ModelAdmin):

0 commit comments

Comments
 (0)