diff --git a/cms/djangoapps/contentstore/tests/test_import.py b/cms/djangoapps/contentstore/tests/test_import.py index b241857dbc..cf11196cb2 100644 --- a/cms/djangoapps/contentstore/tests/test_import.py +++ b/cms/djangoapps/contentstore/tests/test_import.py @@ -88,12 +88,12 @@ class ContentStoreImportTest(ModuleStoreTestCase): # Checks to make sure that a course with an org/course like # edx/course can be imported into a namespace with an org/course # like edx/course_name - module_store, __, __, course_location = self.load_test_import_course() + module_store, __, course = self.load_test_import_course() __, course_items = import_from_xml( module_store, 'common/test/data', ['test_import_course_2'], - target_location_namespace=course_location, + target_course_id=course.id, verbose=True, ) self.assertEqual(len(course_items), 1) diff --git a/common/lib/xmodule/xmodule/modulestore/xml_exporter.py b/common/lib/xmodule/xmodule/modulestore/xml_exporter.py index f0710349e7..be00414697 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml_exporter.py +++ b/common/lib/xmodule/xmodule/modulestore/xml_exporter.py @@ -86,8 +86,7 @@ def export_to_xml(modulestore, contentstore, course_key, root_dir, course_dir, d try: course_image = contentstore.find( StaticContent.compute_location( - course.location.org, - course.location.course, + course.id, course.course_image ), )