Commit 0049c97d by jsa Committed by Andy Armstrong

use bulk_ops on course_about

parent 9607aa23
...@@ -737,16 +737,14 @@ def course_about(request, course_id): ...@@ -737,16 +737,14 @@ def course_about(request, course_id):
course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id) course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id)
with modulestore().bulk_operations(course_key):
permission_name = microsite.get_value( permission_name = microsite.get_value(
'COURSE_ABOUT_VISIBILITY_PERMISSION', 'COURSE_ABOUT_VISIBILITY_PERMISSION',
settings.COURSE_ABOUT_VISIBILITY_PERMISSION settings.COURSE_ABOUT_VISIBILITY_PERMISSION
) )
course = get_course_with_access(request.user, permission_name, course_key) course = get_course_with_access(request.user, permission_name, course_key)
if microsite.get_value( if microsite.get_value('ENABLE_MKTG_SITE', settings.FEATURES.get('ENABLE_MKTG_SITE', False)):
'ENABLE_MKTG_SITE',
settings.FEATURES.get('ENABLE_MKTG_SITE', False)
):
return redirect(reverse('info', args=[course.id.to_deprecated_string()])) return redirect(reverse('info', args=[course.id.to_deprecated_string()]))
registered = registered_for_course(course, request.user) registered = registered_for_course(course, request.user)
...@@ -768,7 +766,7 @@ def course_about(request, course_id): ...@@ -768,7 +766,7 @@ def course_about(request, course_id):
reg_then_add_to_cart_link = "" reg_then_add_to_cart_link = ""
_is_shopping_cart_enabled = is_shopping_cart_enabled() _is_shopping_cart_enabled = is_shopping_cart_enabled()
if (_is_shopping_cart_enabled): if _is_shopping_cart_enabled:
registration_price = CourseMode.min_course_price_for_currency(course_key, registration_price = CourseMode.min_course_price_for_currency(course_key,
settings.PAID_COURSE_REGISTRATION_CURRENCY[0]) settings.PAID_COURSE_REGISTRATION_CURRENCY[0])
if request.user.is_authenticated(): if request.user.is_authenticated():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment