This commit is contained in:
Ross
2021-11-21 11:13:32 +00:00
parent da1d8eb71b
commit 382ef07192
+1 -1
View File
@@ -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.