From 72dac75710ea6d3a192bec52a7eccdaf5aecec04 Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Thu, 30 Oct 2025 20:23:55 +0530 Subject: [PATCH] fix: lgeacy library block child.save fails in production instance while migrating (#37573) The child.save() call while migrating legacy library block to library version 2 fails with `InvalidScopeError` due to presence of `LmsFieldData` in` _bound_field_data` field. Removing this call does not seem to have any adverse affect. --- xmodule/library_content_block.py | 1 - 1 file changed, 1 deletion(-) diff --git a/xmodule/library_content_block.py b/xmodule/library_content_block.py index d110bcf537..f3d563a7fd 100644 --- a/xmodule/library_content_block.py +++ b/xmodule/library_content_block.py @@ -325,7 +325,6 @@ class LegacyLibraryContentBlock(ItemBankMixin, XModuleToXBlockMixin, XBlock): # Since after migration, the component in library is in draft state, we want to make sure that sync icon # appears when it is published child.upstream_version = 0 - child.save() # Use `modulestore()` instead of `self.runtime.modulestore` to make sure that the XBLOCK_UPDATED signal # is triggered store.update_item(child, None)