Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing end field #34880

Merged
merged 2 commits into from
May 31, 2024
Merged
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion cms/djangoapps/contentstore/views/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,7 @@ def _create_or_rerun_course(request):
display_name = request.json.get('display_name')
# force the start date for reruns and allow us to override start via the client
start = request.json.get('start', CourseFields.start.default)
end = request.json.get('end', CourseFields.end.default)
run = request.json.get('run')
has_course_creator_role = is_content_creator(request.user, org)

Expand All @@ -892,7 +893,7 @@ def _create_or_rerun_course(request):
status=400
)

fields = {'start': start}
fields = {'start': start, 'end': end}
if display_name is not None:
fields['display_name'] = display_name

Expand Down Expand Up @@ -1040,6 +1041,7 @@ def rerun_course(user, source_course_key, org, number, run, fields, background=T
add_instructor(destination_course_key, user, user)

# Mark the action as initiated
print(fields)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like lint that needs to be deleted

CourseRerunState.objects.initiated(source_course_key, destination_course_key, user, fields['display_name'])

# Clear the fields that must be reset for the rerun
Expand Down
Loading