From 706862ca83bd9f3d6621cab9b5df2069c478af37 Mon Sep 17 00:00:00 2001 From: Muhammad Faraz Maqsood Date: Thu, 23 Oct 2025 23:08:51 +0500 Subject: [PATCH] fix: copy paste component from one course to another --- cms/djangoapps/contentstore/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/djangoapps/contentstore/helpers.py b/cms/djangoapps/contentstore/helpers.py index 2cc7ba94e748..91236a4dade9 100644 --- a/cms/djangoapps/contentstore/helpers.py +++ b/cms/djangoapps/contentstore/helpers.py @@ -745,7 +745,7 @@ def _import_file_into_course( if thumbnail_content is not None: content.thumbnail_location = thumbnail_location contentstore().save(content) - return True, {clipboard_file_path: f"static/{import_path}"} + return True, {clipboard_file_path: filename if not import_path else f"static/{import_path}"} elif current_file.content_digest == file_data_obj.md5_hash: # The file already exists and matches exactly, so no action is needed return None, {}