diff --git a/rapids/models.py b/rapids/models.py index cc880c5a..25d3e0d5 100644 --- a/rapids/models.py +++ b/rapids/models.py @@ -315,10 +315,6 @@ class Rapid(models.Model): def get_image_annotations(self): annotations = [i.image_annotations for i in self.images.all() if not i.feedback_image] - a = set(annotations) - a.remove("") - if len(a) < 1: - annotations = "" return json.dumps([i.image_annotations for i in self.images.all() if not i.feedback_image]) def get_laterality_string(self): diff --git a/static/js/dicomViewer.js b/static/js/dicomViewer.js index 529aaaea..f964ec0f 100644 --- a/static/js/dicomViewer.js +++ b/static/js/dicomViewer.js @@ -183,7 +183,7 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l console.log("loadAnnotations", imageId, annotations); const toolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager; - if (annotation == undefined || annotation.length < 1) { return } + if (annotation == undefined || annotation.length < 1 || annotation == [undefined]) { return } console.log(annotation); let tool_state_no_id = JSON.parse(annotation);