Stringify ObjectIds before attempting to make a filename out of them
This commit is contained in:
committed by
AlasdairSwan
parent
1160306438
commit
6cb55e1a36
@@ -53,7 +53,7 @@ class CachingDescriptorSystem(MakoDescriptorSystem, EditInfoRuntimeMixin):
|
||||
if course_entry.course_key.course:
|
||||
root = modulestore.fs_root / course_entry.course_key.org / course_entry.course_key.course / course_entry.course_key.run
|
||||
else:
|
||||
root = modulestore.fs_root / course_entry.structure['_id']
|
||||
root = modulestore.fs_root / str(course_entry.structure['_id'])
|
||||
root.makedirs_p() # create directory if it doesn't exist
|
||||
|
||||
id_manager = SplitMongoIdManager(self)
|
||||
|
||||
Reference in New Issue
Block a user