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.
This commit is contained in:
Navin Karkera
2025-10-30 20:23:55 +05:30
committed by GitHub
parent e68e39d957
commit 72dac75710

View File

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