Skip to content

Commit

Permalink
feat: Disabled MITx from program nudge emails
Browse files Browse the repository at this point in the history
  • Loading branch information
irfanuddinahmad committed Jan 3, 2025
1 parent 645e898 commit 61d19de
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from django.contrib.sites.models import Site
from django.core.management import BaseCommand
from django.utils import timezone
from opaque_keys.edx.keys import CourseKey
from opaque_keys.edx.locator import CourseLocator

from common.djangoapps.track import segment
Expand Down Expand Up @@ -140,7 +141,9 @@ def get_course_run_to_suggest(self, candidate_programs, completed_course_id, use
)
break
for course_run in candidate_course['course_runs']:
if self.valid_course_run(course_run) and course_run['key'] != completed_course_id:
course_org = CourseKey.from_string(course_run['key']).org
if self.valid_course_run(course_run) and course_run['key'] != completed_course_id \
and course_org not in settings.DISABLED_ORGS_PROGRAM_NUDGE:
return program, course_run, candidate_course
return None, None, None

Expand Down

0 comments on commit 61d19de

Please sign in to comment.