Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
fixup! Manual changes for course key
Browse files Browse the repository at this point in the history
Located with `grep -nrI DemoX | grep -x demo_course`
  • Loading branch information
timmc-edx committed Feb 7, 2024
1 parent aaad57f commit c7c5a74
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions programs/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Course, CourseRun, Organization, Program, ProgramType, SeatType
)

DEMO_IMAGE_URL = 'http://edx.devstack.lms:18000/asset-v1:edX+DemoX+Demo_Course+type@asset+block@images_course_image.jpg'
DEMO_IMAGE_URL = 'http://edx.devstack.lms:18000/asset-v1:Axim+DemoX+demo_course+type@asset+block@images_course_image.jpg'


# Make sure micromasters type exists
Expand Down Expand Up @@ -39,12 +39,12 @@

# Now, after an ID has been created, connect the program to other models

course = Course.objects.get(key='edX+DemoX')
course = Course.objects.get(key='Axim+DemoX')
program.courses.set([course])

try:
# This run causes run-time exceptions, because it uses old style key.
deprecated_run = CourseRun.objects.get(key='edX/DemoX/Demo_Course')
deprecated_run = CourseRun.objects.get(key='Axim/DemoX/demo_course')
program.excluded_course_runs = [deprecated_run]
except CourseRun.DoesNotExist:
# This key only seems to be in some existing devstacks, don't worry if it doesn't exist
Expand Down

0 comments on commit c7c5a74

Please sign in to comment.