fix a few small upload bugs
This commit is contained in:
+3
-2
@@ -1304,8 +1304,7 @@ class UncategorisedDicom(models.Model):
|
||||
try:
|
||||
self.series_instance_uid = ds["SeriesInstanceUID"].value
|
||||
except AttributeError:
|
||||
# ? only called with invalid dicom?
|
||||
self.series_instance_uid = ds["SeriesInstanceUID"]
|
||||
raise InvalidDicomError("Invalid dicom file")
|
||||
|
||||
# if self.check_for_duplicates():
|
||||
# return DuplicateDicom
|
||||
@@ -1333,6 +1332,8 @@ class UncategorisedDicom(models.Model):
|
||||
ds = pydicom.dcmread(self.image)
|
||||
return ds
|
||||
except pydicom.errors.InvalidDicomError:
|
||||
print("Error getting dicom dataset")
|
||||
print(self.image)
|
||||
return {"SeriesInstanceUID": "1234"}
|
||||
|
||||
def get_basic_dicom_tags(self, dataset=None):
|
||||
|
||||
Reference in New Issue
Block a user