This commit is contained in:
Ross
2021-11-29 20:00:38 +00:00
parent 343808672a
commit 281cf84bd5
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -225,6 +225,9 @@ class SeriesFinding(models.Model):
findings = self.findings.all().values_list("name")
return f"{self.series.id}/{findings}/{self.description}"
def annotation_as_string(self) -> str:
return json.dumps(self.annotation_json)
@reversion.register
class Series(models.Model):
+1 -1
View File
@@ -44,7 +44,7 @@ This series is not associated with any cases.
{% for finding in series.findings.all %}
<div>
<button class="view-finding-button" data-json="{{finding.annotation_json}}">Click to view</button>
<button class="view-finding-button" data-json="{{finding.annotation_as_string}}">Click to view</button>
Findings: {{finding.findings.all|join:", "}}
Description: {{finding.description}}<br />
<a href="{% url 'atlas:delete_finding' pk=finding.pk %}">Delete finding</a>