From e63824cfd4927074462f97c47d5eba5d5edf70da Mon Sep 17 00:00:00 2001 From: Ross Date: Sun, 28 Nov 2021 23:49:34 +0000 Subject: [PATCH] . --- atlas/templates/atlas/series_viewer.html | 4 ++-- atlas/views.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/atlas/templates/atlas/series_viewer.html b/atlas/templates/atlas/series_viewer.html index f78d3827..e3add434 100755 --- a/atlas/templates/atlas/series_viewer.html +++ b/atlas/templates/atlas/series_viewer.html @@ -75,8 +75,8 @@ This series is not associated with any cases. data: { description: $('#description').val(), series: {{series.pk}}, - annotation_json: cornerstoneTools.globalImageIdSpecificToolStateManager.saveToolState(), - findings: $('#finding-form select[name="findings"]').find(":selected").map((i, el) => { return $(el).val() }).toArray(), + annotation_json: JSON.stringify(cornerstoneTools.globalImageIdSpecificToolStateManager.saveToolState()), + findings: JSON.stringfy($('#finding-form select[name="findings"]').find(":selected").map((i, el) => { return $(el).val() }).toArray()), csrfmiddlewaretoken: $('input[name=csrfmiddlewaretoken]').val(), action: 'post' }, diff --git a/atlas/views.py b/atlas/views.py index a5f520ca..fc90f123 100755 --- a/atlas/views.py +++ b/atlas/views.py @@ -522,9 +522,9 @@ def create_series_findings(request): if request.POST.get('action') == 'post': series_id = request.POST.get('series') - findings_ids = request.POST.get('findings') + findings_ids = json.loads(request.POST.get('findings')) description = request.POST.get('description') - annotation_json = request.POST.get('annotation_json') + annotation_json = json.loads(request.POST.get('annotation_json')) series = Series.objects.get(pk=series_id) findings = Finding.objects.filter(pk__in=findings_ids)