Merge pull request #28388 from edx/mikix/library-import-fix

fix: allow importing courses into Studio with empty libraries
This commit is contained in:
Michael Terry
2021-08-03 16:49:15 -04:00
committed by GitHub

View File

@@ -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)