Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions openedx/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,7 @@ def update_edx_course( # noqa: PLR0913
)


def fix_cloned_run_data(target_course: CourseRun, edx_client) -> CourseRun:
def fix_cloned_run_data(target_course: CourseRun, *, edx_client=None) -> CourseRun:
"""Fix the title, pacing, and dates for a newly cloned run."""

course_params = [
Expand Down Expand Up @@ -1627,14 +1627,8 @@ def process_course_run_clone(target_course: CourseRun, base_course_key: str):
# We should have the target course in edX now. We need to update it with the
# data from our course run.
# Run these after the transaction that this will most likely be
transaction.on_commit(
partial(fix_cloned_run_data, target_course=target_course, edx_client=edx_client)
)
transaction.on_commit(
partial(
push_edx_modes_from_run, course_run=target_course, edx_client=edx_client
)
)
transaction.on_commit(partial(fix_cloned_run_data, target_course=target_course))
Comment thread
sentry[bot] marked this conversation as resolved.
transaction.on_commit(partial(push_edx_modes_from_run, course_run=target_course))


def get_edx_course_modes(
Expand Down
Loading