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