Fix more cms contentstore tests.

This commit is contained in:
Feanil Patel
2019-10-07 17:12:04 -04:00
parent 2d766e7b5d
commit 9610aab0f8
5 changed files with 9 additions and 5 deletions

View File

@@ -346,7 +346,7 @@ def copy_or_rename_transcript(new_name, old_name, item, delete_old=False, user=N
"""
filename = u'subs_{0}.srt.sjson'.format(old_name)
content_location = StaticContent.compute_location(item.location.course_key, filename)
transcripts = contentstore().find(content_location).data
transcripts = contentstore().find(content_location).data.decode('utf-8')
save_subs_to_store(json.loads(transcripts), new_name, item)
item.sub = new_name
item.save_with_metadata(user)