From 09756c7db9341aace9e9ac25c9078c8cd4bf8399 Mon Sep 17 00:00:00 2001 From: adityacp Date: Tue, 4 Apr 2017 10:42:22 +0530 Subject: Fix failing test views test --- yaksh/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'yaksh') diff --git a/yaksh/views.py b/yaksh/views.py index 247aca4..661d472 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -661,7 +661,8 @@ def course_detail(request, course_id): raise Http404('You are not allowed to view this page') course = get_object_or_404(Course, pk=course_id) - + if not course.is_creator(user) and not course.is_teacher(user): + raise Http404('This course does not belong to you') return my_render_to_response('yaksh/course_detail.html', {'course': course}, context_instance=ci) -- cgit