Skip to content

Commit c548fd2

Browse files
committed
Update the model to use compute_patch_checksum function
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
1 parent 30ce96b commit c548fd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vulnerabilities/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2800,7 +2800,7 @@ class PackageCommitPatch(models.Model):
28002800

28012801
def save(self, *args, **kwargs):
28022802
if self.patch_text:
2803-
self.patch_checksum = hashlib.sha512(self.patch_text.encode("utf-8")).hexdigest()
2803+
self.patch_checksum = compute_patch_checksum(self.patch_text)
28042804
super().save(*args, **kwargs)
28052805

28062806
class Meta:

0 commit comments

Comments
 (0)