From 93632c8f8a5f406bd6a5a58ffb90c5d50b2745e2 Mon Sep 17 00:00:00 2001 From: Ross Date: Sat, 4 Dec 2021 23:09:19 +0000 Subject: [PATCH] . --- atlas/models.py | 4 ++++ atlas/templates/atlas/series_viewer.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/atlas/models.py b/atlas/models.py index d1abdd8f..b2e5609b 100644 --- a/atlas/models.py +++ b/atlas/models.py @@ -306,6 +306,10 @@ class Series(models.Model): self.pk, self.get_examination(), self.description, case_id ) + def get_absolute_url(self): + return reverse("series:series_detail", kwargs={"pk": self.pk}) + + def get_author_objects(self): """Returns a comma seperated text list of authors""" if self.author: diff --git a/atlas/templates/atlas/series_viewer.html b/atlas/templates/atlas/series_viewer.html index 30568953..3442004e 100755 --- a/atlas/templates/atlas/series_viewer.html +++ b/atlas/templates/atlas/series_viewer.html @@ -168,7 +168,7 @@ This series is not associated with any cases. success: function (json) { $("#finding-form").empty(); toastr.info('Finding added.'); - location.reload(); + location.reload({{series.get_absolute_url}}); }, error: function (xhr, errmsg, err) { console.log(xhr.status + ": " + xhr