diff --git a/cms/djangoapps/contentstore/helpers.py b/cms/djangoapps/contentstore/helpers.py index 3ca67b0cb031..9fd09193b59f 100644 --- a/cms/djangoapps/contentstore/helpers.py +++ b/cms/djangoapps/contentstore/helpers.py @@ -17,6 +17,7 @@ from xmodule.contentstore.content import StaticContent from xmodule.contentstore.django import contentstore from xmodule.exceptions import NotFoundError +from xmodule.library_content_block import LibraryContentBlock from xmodule.modulestore.django import modulestore from xmodule.xml_block import XmlMixin @@ -336,7 +337,7 @@ def _import_xml_node_to_parent( new_xblock = store.update_item(temp_xblock, user_id, allow_not_found=True) parent_xblock.children.append(new_xblock.location) store.update_item(parent_xblock, user_id) - if new_xblock.scope_ids.block_type == "library_content": + if isinstance(new_xblock, LibraryContentBlock): # Special case handling for library content. If we need this for other blocks in the future, it can be made into # an API, and we'd call new_block.studio_post_paste() instead of this code. # In this case, we want to pull the children from the library and let library_tools assign their IDs.