From e8d5b25a2abefc78167c706812231489eaef2cad Mon Sep 17 00:00:00 2001 From: Ross Date: Sun, 28 Nov 2021 23:35:34 +0000 Subject: [PATCH] . --- atlas/forms.py | 2 +- atlas/templates/atlas/series_viewer.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/atlas/forms.py b/atlas/forms.py index e91ffb3e..50382b35 100755 --- a/atlas/forms.py +++ b/atlas/forms.py @@ -36,7 +36,7 @@ class ExaminationForm(ModelForm): class SeriesFindingsForm(ModelForm): class Meta: model = SeriesFindings - exclude = [""] + exclude = ["series", "annotation_json"] def __init__(self, *args, **kwargs): if kwargs.get("series_id"): diff --git a/atlas/templates/atlas/series_viewer.html b/atlas/templates/atlas/series_viewer.html index 30cba7ce..31f7a20a 100755 --- a/atlas/templates/atlas/series_viewer.html +++ b/atlas/templates/atlas/series_viewer.html @@ -64,9 +64,9 @@ This series is not associated with any cases. url: '{% url "atlas:add_finding" %}', data: { description: $('#description').val(), - series: $('#finding-form select[name="series"]').find(":selected").val(), + series: {{series.pk}}, annotation_json: cornerstoneTools.globalImageIdSpecificToolStateManager.saveToolState(), - findings: $('#finding-form select[name="findings"]').find(":selected").val(), + findings: $('#finding-form select[name="findings"]').find(":selected").map((i, el) => { return $(el).val() }).toArray(), csrfmiddlewaretoken: $('input[name=csrfmiddlewaretoken]').val(), action: 'post' },