Skip to content

Commit

Permalink
fix: set legal and internal review to publish during CSVLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-D-Akbar committed Dec 9, 2024
1 parent c4599d9 commit bf2260b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ def ingest(self): # pylint: disable=too-many-statements

course_run.refresh_from_db()

if course_run.status in [CourseRunStatus.Unpublished, CourseRunStatus.LegalReview]:
if course_run.status in [CourseRunStatus.Unpublished, CourseRunStatus.LegalReview,
CourseRunStatus.InternalReview]:
if course_run.status == CourseRunStatus.Unpublished:
# Pushing the run into LegalReview is necessary to ensure that the
# url slug is correctly generated in subdirectory format
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,9 @@ def test_ingest_flow_for_preexisting_unpublished_course(self, jwt_decode_patch):
)

@responses.activate
def test_ingest_flow_for_preexisting_course_having_run_in_legal_review_status(
self, jwt_decode_patch
@data(CourseRunStatus.LegalReview, CourseRunStatus.InternalReview)
def test_ingest_flow_for_preexisting_course_having_run_in_review_statuses(
self, status, jwt_decode_patch
): # pylint: disable=unused-argument
"""
Verify that the course run will be reviewed if csv loader updates data for a course having a run in legal
Expand All @@ -744,7 +745,7 @@ def test_ingest_flow_for_preexisting_course_having_run_in_legal_review_status(
course=course,
key=self.COURSE_RUN_KEY,
type=self.course_run_type,
status=CourseRunStatus.LegalReview,
status=status,
go_live_date=datetime.datetime.now(UTC) - datetime.timedelta(days=5),
draft=True,
fixed_price_usd=111.11
Expand Down

0 comments on commit bf2260b

Please sign in to comment.