fix: Copy/Paste unit with python_lib.zip (#33164)
This fixes the issue when pasting a copied unit that contains python_lib.zip file into another course. The python_lib.zip file was not being correctly copied over to the new course's Files & Uploads page.
This commit is contained in:
@@ -38,7 +38,7 @@ class XBlockSerializer:
|
||||
if path not in [sf.name for sf in self.static_files]:
|
||||
self.static_files.append(StaticFile(name=path, url=asset['url'], data=None))
|
||||
|
||||
if block.scope_ids.usage_id.block_type == 'problem':
|
||||
if block.scope_ids.usage_id.block_type in ['problem', 'vertical']:
|
||||
py_lib_zip_file = utils.get_python_lib_zip_if_using(self.olx_str, course_key)
|
||||
if py_lib_zip_file:
|
||||
self.static_files.append(py_lib_zip_file)
|
||||
|
||||
Reference in New Issue
Block a user