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: handle draft only courses properly in archive_courses command #4545

Merged
merged 3 commits into from
Jan 17, 2025

Conversation

zawan-ila
Copy link
Contributor

PROD-4289

Currently the archive_course command ignores courses without official versions. We change the behavior so that they are not.

def verify_archived(self, course, mangle_title, mangle_end_date):
for c in [course, course.draft_version]:
def verify_archived(self, course, mangle_title, mangle_end_date, is_official=True):
for c in ([course, course.draft_version] if is_official else [course]):
Copy link
Contributor

Choose a reason for hiding this comment

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

To confirm, the [course] in else is draft version, right? It is confusing because the other option has course, course.draft_version which then immediately takes it to mind that other [course] is non-draft in else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I have added a comment to clarify this.

@zawan-ila zawan-ila merged commit 2acb71a into openedx:master Jan 17, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants