From 3111f59580dbf00692366d3e5344dee649abf66b Mon Sep 17 00:00:00 2001
From: Jorran de Wit <jorrandewit@outlook.com>
Date: Wed, 7 Jun 2017 20:16:57 +0200
Subject: [PATCH] Fix `next-issue` not filtered per journal

---
 journals/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/journals/views.py b/journals/views.py
index 2f0f5726d..0a8813d79 100644
--- a/journals/views.py
+++ b/journals/views.py
@@ -124,7 +124,7 @@ def issue_detail(request, doi_label):
     journal = issue.in_volume.in_journal
 
     papers = issue.publication_set.order_by('paper_nr')
-    next_issue = (Issue.objects.published(journal=journal,
+    next_issue = (Issue.objects.published(in_volume__in_journal=journal,
                                           start_date__gt=issue.start_date)
                                .order_by('start_date').first())
     prev_issue = (Issue.objects.published(in_volume__in_journal=journal,
-- 
GitLab