Skip to content

Commit

Permalink
MCKIN-21719 Fixed 500 instead of 404 on proxy_content
Browse files Browse the repository at this point in the history
MCKIN-21719 Fixed 500 instead of 404 on proxy_content
storage.path works with local storage but doesn't work with s3
nasirhjafri authored Jul 16, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 1857bda commit 6eedb3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scormxblock/scormxblock.py
Original file line number Diff line number Diff line change
@@ -494,7 +494,7 @@ def proxy_content(self, request, suffix=''):
if ext in mimetypes.types_map:
content_type = mimetypes.types_map[ext]
else:
return Response('Did not exist in storage: ' + path_to_file + '\nstorage.path=' + storage.path(''), status=404, content_type='text/html', charset='UTF-8')
return Response('Did not exist in storage: ' + path_to_file , status=404, content_type='text/html', charset='UTF-8')
return Response(contents, content_type=content_type)

def generate_report_data(self, user_state_iterator, limit_responses=None):

0 comments on commit 6eedb3f

Please sign in to comment.