summaryrefslogtreecommitdiff
path: root/app/posts/views
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2020-12-04 10:31:33 -0500
committerluxagraf <sng@luxagraf.net>2020-12-04 10:31:33 -0500
commit40c0bedc6a45d9dc196bd17364f34fb49fb1bb6e (patch)
tree737a6fef465f64dd19e15139a9d99be36411a4ed /app/posts/views
parent66c4530e6f002329e7fc4b3ee6d024235feb5ed9 (diff)
fixed a bug in essay views
Diffstat (limited to 'app/posts/views')
-rw-r--r--app/posts/views/guide_views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/posts/views/guide_views.py b/app/posts/views/guide_views.py
index e2f98f3..3d7ca86 100644
--- a/app/posts/views/guide_views.py
+++ b/app/posts/views/guide_views.py
@@ -65,8 +65,8 @@ class PostDetailView(LuxDetailView):
context = super(PostDetailView, self).get_context_data(**kwargs)
related = []
for obj in self.object.related.all():
- model = apps.get_model(obj.post_model.app_label, obj.post_model.model)
- related.append(model.objects.get(slug=obj.slug))
+ model = apps.get_model(obj.model_name.app_label, obj.model_name.model)
+ related.append(model.objects.get(slug=obj.slug, pub_date=obj.pub_date))
context['related'] = related
return context