Skip to content
Snippets Groups Projects
Commit 8d1989cf authored by Michael Terry's avatar Michael Terry
Browse files

fix: allow importing courses into Studio with empty libraries

If a content library xblock does not specify a library id, we
previously would error out when importing, due to some cleanup
code that wasn't accounting for this case.
parent 83ea8782
No related branches found
No related tags found
No related merge requests found
......@@ -878,7 +878,7 @@ def _update_and_import_module(
if block.location.block_type == 'library_content':
# If library exists, update source_library_version and children
# according to this existing library and library content block.
if store.get_library(block.source_library_key):
if block.source_library_id and store.get_library(block.source_library_key):
# If the library content block is already in the course, then don't
# refresh the children when we re-import it. This lets us address
# TNL-7507 (Randomized Content Block Settings Lost in Course Import)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment