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(external course sync): sync course run dates if they are missing #3027

Merged
merged 1 commit into from
Jun 26, 2024
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
19 changes: 12 additions & 7 deletions courses/sync_external_courses/emeritus_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,13 +391,18 @@ def create_or_update_emeritus_course_run(course, emeritus_course):
)
return course_run, True
elif (
course_run.start_date
and emeritus_course.start_date
and course_run.start_date.date() != emeritus_course.start_date.date()
) or (
course_run.end_date
and emeritus_course.end_date
and course_run.end_date.date() != emeritus_course.end_date.date()
(not course_run.start_date and emeritus_course.start_date)
or (
course_run.start_date
and emeritus_course.start_date
and course_run.start_date.date() != emeritus_course.start_date.date()
)
or (not course_run.end_date and emeritus_course.end_date)
or (
course_run.end_date
and emeritus_course.end_date
and course_run.end_date.date() != emeritus_course.end_date.date()
)
):
course_run.start_date = emeritus_course.start_date
course_run.end_date = emeritus_course.end_date
Expand Down
Loading