.
This commit is contained in:
+1
-1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user