From 382ef071924cf3ed82de91c7da6d1d7675e2cb03 Mon Sep 17 00:00:00 2001 From: Ross Date: Sun, 21 Nov 2021 11:13:32 +0000 Subject: [PATCH] . --- rapids/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rapids/models.py b/rapids/models.py index 966456e1..438eb433 100644 --- a/rapids/models.py +++ b/rapids/models.py @@ -462,7 +462,7 @@ class RapidImage(models.Model): self.is_dicom = True except pydicom.errors.InvalidDicomError: self.image.file.open() - hash = hashlib.md5(self.image.file).hexdigest() + hash = hashlib.md5(self.image.read()).hexdigest() self.image_md5_hash = hash super().save(*args, **kwargs) # Call the "real" save() method.