Merge remote-tracking branch 'origin/feature/cale/cms-master' into
feature/dhm/cms-settings Conflicts: cms/djangoapps/contentstore/course_info_model.py cms/djangoapps/contentstore/views.py cms/static/js/models/course_info.js cms/static/js/template_loader.js cms/static/js/views/course_info_edit.js cms/templates/base.html cms/templates/course_info.html cms/urls.py
This commit is contained in:
@@ -8,7 +8,7 @@ def expect_json(view_function):
|
||||
def expect_json_with_cloned_request(request, *args, **kwargs):
|
||||
# cdodge: fix postback errors in CMS. The POST 'content-type' header can include additional information
|
||||
# e.g. 'charset', so we can't do a direct string compare
|
||||
if request.META['CONTENT_TYPE'].lower().startswith("application/json"):
|
||||
if request.META.get('CONTENT_TYPE','').lower().startswith("application/json"):
|
||||
cloned_request = copy.copy(request)
|
||||
cloned_request.POST = cloned_request.POST.copy()
|
||||
cloned_request.POST.update(json.loads(request.body))
|
||||
|
||||
Reference in New Issue
Block a user