diff --git a/cms/djangoapps/contentstore/xblock_storage_handlers/view_handlers.py b/cms/djangoapps/contentstore/xblock_storage_handlers/view_handlers.py index d75d481ad6..a7ae0e518e 100644 --- a/cms/djangoapps/contentstore/xblock_storage_handlers/view_handlers.py +++ b/cms/djangoapps/contentstore/xblock_storage_handlers/view_handlers.py @@ -1304,7 +1304,11 @@ def create_xblock_info( # lint-amnesty, pylint: disable=too-many-statements # Update with gating info xblock_info.update(_get_gating_info(course, xblock)) # Also add upstream info - xblock_info["upstream_info"] = UpstreamLink.try_get_for_block(xblock, log_error=False).to_json() + upstream_info = UpstreamLink.try_get_for_block(xblock, log_error=False).to_json() + xblock_info["upstream_info"] = upstream_info + # Disable adding or removing children component if xblock is imported from library + if upstream_info["upstream_ref"]: + xblock_actions["childAddable"] = False if is_xblock_unit: # if xblock is a Unit we add the discussion_enabled option xblock_info["discussion_enabled"] = xblock.discussion_enabled