From 268b5b47aeca7315650c42dafcff086bf03904eb Mon Sep 17 00:00:00 2001 From: Julian Arni Date: Fri, 20 Sep 2013 17:25:43 -0400 Subject: [PATCH] Remove cache workaround --- common/djangoapps/contentserver/middleware.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/djangoapps/contentserver/middleware.py b/common/djangoapps/contentserver/middleware.py index 0174c39fea..8d81929693 100644 --- a/common/djangoapps/contentserver/middleware.py +++ b/common/djangoapps/contentserver/middleware.py @@ -22,8 +22,7 @@ class StaticContentServer(object): return response # first look in our cache so we don't have to round-trip to the DB - #content = get_cached_content(loc) - content = None + content = get_cached_content(loc) if content is None: # nope, not in cache, let's fetch from DB try: @@ -47,7 +46,7 @@ class StaticContentServer(object): # Check that user has access to content if getattr(content, "locked", False): if not hasattr(request, "user") or not request.user.is_authenticated(): - return redirect('root') + return redirect('login') course_id = "/".join([loc.org, loc.course, loc.name]) if not CourseEnrollment.is_enrolled(request.user, course_id): return redirect('dashboard')