Skip to content

Commit

Permalink
feat: [EDXOLDMNG-116] support for legacy assets with deprecated is re…
Browse files Browse the repository at this point in the history
…moved
  • Loading branch information
NiedielnitsevIvan committed Dec 20, 2022
1 parent 7039eb1 commit b1b3b2d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cms/djangoapps/contentstore/views/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,9 @@ def _upload_asset(request, course_key):
if course_exists_error is not None:
return course_exists_error

if course_key.deprecated:
return JsonResponse({'error': 'Uploading assets for the legacy course is not available.'}, status=400)

# compute a 'filename' which is similar to the location formatting, we're
# using the 'filename' nomenclature since we're using a FileSystem paradigm
# here. We're just imposing the Location string formatting expectations to
Expand Down

0 comments on commit b1b3b2d

Please sign in to comment.