Skip to content

Commit d6fd9eb

Browse files
committed
fix: Issue when migrating legacy libraries with large keys
1 parent 5d01a40 commit d6fd9eb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • cms/djangoapps/modulestore_migrator

cms/djangoapps/modulestore_migrator/tasks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ def migrate_from_modulestore(
580580
staged_content = staging_api.stage_xblock_temporarily(
581581
block=legacy_root,
582582
user_id=status.user.pk,
583-
purpose=CONTENT_STAGING_PURPOSE_TEMPLATE.format(source_key=source_data.source.key),
583+
purpose=CONTENT_STAGING_PURPOSE_TEMPLATE.format(source_key=source_pk),
584584
)
585585
migration.staged_content = staged_content
586586
status.increment_completed_steps()
@@ -773,7 +773,7 @@ def bulk_migrate_from_modulestore(
773773
staged_content = staging_api.stage_xblock_temporarily(
774774
block=legacy_root_list[i],
775775
user_id=status.user.pk,
776-
purpose=CONTENT_STAGING_PURPOSE_TEMPLATE.format(source_key=source_data.source.key),
776+
purpose=CONTENT_STAGING_PURPOSE_TEMPLATE.format(source_key=source_pk),
777777
)
778778
source_data.migration.staged_content = staged_content
779779
status.increment_completed_steps()

0 commit comments

Comments
 (0)