diff --git a/course/page/code.py b/course/page/code.py index 4587d16f0..595cd635f 100644 --- a/course/page/code.py +++ b/course/page/code.py @@ -700,7 +700,7 @@ def code_to_answer_data(self, page_context, code): from django.core.files.base import ContentFile saved_name = settings.RELATE_BULK_STORAGE.save( self.get_submission_filename_pattern(page_context), - ContentFile(code)) + ContentFile(code.encode("utf-8"))) return {"storage_filename": saved_name}