From 5ae7a60eec8c560075df97bf1ee82de5853d5579 Mon Sep 17 00:00:00 2001 From: lxf Date: Sat, 7 Dec 2019 14:19:16 +0000 Subject: fixed a bug in jrnl viewsw --- 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 ed5018b..489d750 100644 --- a/app/jrnl/views.py +++ b/app/jrnl/views.py @@ -99,7 +99,7 @@ class EntryDetailView(DateDetailView): ).select_related().order_by('ap_id', 'ap__apclass__kind').distinct("ap") related = [] for obj in self.object.related.all(): - model = apps.get_model(obj.post_model.app_label, obj.post_model.model) + model = apps.get_model(obj.model_name.app_label, obj.model_name.model) related.append(model.objects.get(slug=obj.slug)) context['related'] = related return context -- cgit v1.2.3-70-g09d2