From 25b1e2699782b522c4dbf6d3beff6d8c7b1b270e Mon Sep 17 00:00:00 2001 From: luxagraf Date: Mon, 23 Dec 2019 05:59:19 -0500 Subject: fixed a bug in related posts --- app/jrnl/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/jrnl') diff --git a/app/jrnl/views.py b/app/jrnl/views.py index 489d750..1b38de9 100644 --- a/app/jrnl/views.py +++ b/app/jrnl/views.py @@ -100,7 +100,7 @@ class EntryDetailView(DateDetailView): related = [] for obj in self.object.related.all(): model = apps.get_model(obj.model_name.app_label, obj.model_name.model) - related.append(model.objects.get(slug=obj.slug)) + related.append(model.objects.get(slug=obj.slug, pub_date=obj.pub_date)) context['related'] = related return context -- cgit v1.2.3-70-g09d2