Commit 0256201a9e626bb1c05ab3e353fd8c5940321dd3
1 parent
999ebc8a
Exists in
master
and in
5 other branches
Fixing bug on subject view
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
courses/views.py
@@ -267,7 +267,7 @@ class SubjectsView(LoginRequiredMixin, generic.ListView): | @@ -267,7 +267,7 @@ class SubjectsView(LoginRequiredMixin, generic.ListView): | ||
267 | context = super(SubjectsView, self).get_context_data(**kwargs) | 267 | context = super(SubjectsView, self).get_context_data(**kwargs) |
268 | context['course'] = subject.course | 268 | context['course'] = subject.course |
269 | context['subject'] = subject | 269 | context['subject'] = subject |
270 | - context['topics'] = subject.topics.all() | 270 | + context['topics'] = Topic.objects.filter(subject = subject) |
271 | return context | 271 | return context |
272 | 272 | ||
273 | class TopicsView(LoginRequiredMixin, generic.ListView): | 273 | class TopicsView(LoginRequiredMixin, generic.ListView): |