.
This commit is contained in:
@@ -90,7 +90,7 @@ This series is not associated with any cases.
|
||||
$("#hidden-form").hide()
|
||||
});
|
||||
|
||||
{% if editing_finding %}
|
||||
{% if editing_finding > 0 %}
|
||||
$("#hidden-form").show()
|
||||
{% endif %}
|
||||
|
||||
|
||||
+8
-8
@@ -119,7 +119,7 @@ def case_detail(request, pk):
|
||||
def series_detail(request, pk, finding_pk=None):
|
||||
series = get_object_or_404(Series, pk=pk)
|
||||
|
||||
editing_finding = False
|
||||
editing_finding = -1
|
||||
if finding_pk is not None:
|
||||
finding = get_object_or_404(SeriesFinding, pk=finding_pk)
|
||||
series_finding_form = SeriesFindingForm(None, instance=finding)
|
||||
@@ -566,19 +566,19 @@ def create_series_findings(request):
|
||||
findings = Finding.objects.filter(pk__in=findings_ids)
|
||||
structures = Structure.objects.filter(pk__in=structure_ids)
|
||||
|
||||
if series_finding_id == "False":
|
||||
if series_finding_id > 0:
|
||||
sf = get_object_or_404(SeriesFinding, pk=series_finding_id)
|
||||
sf.series = series
|
||||
sf.description=description
|
||||
sf.annotation_json=annotation_json
|
||||
sf.viewport_json=viewport_json
|
||||
else:
|
||||
sf = SeriesFinding.objects.create(
|
||||
series=series,
|
||||
description=description,
|
||||
annotation_json=annotation_json,
|
||||
viewport_json=viewport_json,
|
||||
)
|
||||
else:
|
||||
sf = get_object_or_404(SeriesFinding, pk=series_finding_id)
|
||||
sf.series = series
|
||||
sf.description=description
|
||||
sf.annotation_json=annotation_json
|
||||
sf.viewport_json=viewport_json
|
||||
|
||||
|
||||
sf.findings.set(findings)
|
||||
|
||||
Reference in New Issue
Block a user