From 3ebe6a8b9930c85753608866bc5576a45147a72d Mon Sep 17 00:00:00 2001 From: Ross Date: Sun, 21 Nov 2021 11:16:55 +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 fbe29db7..0925d5d0 100644 --- a/rapids/models.py +++ b/rapids/models.py @@ -459,7 +459,7 @@ class RapidImage(models.Model): try: # and generate a hash from the pixel data dataset = pydicom.dcmread(self.image) - hash = hashlib.md5(",".join(dataset.pixel_array.tostring())).hexdigest() + hash = hashlib.md5(",".join(str(dataset.pixel_array.tostring()))).hexdigest() self.is_dicom = True except pydicom.errors.InvalidDicomError: self.image.file.open()