build: man. comm. fails more loudly when nothing to do

JIRA:EDUCATOR-5112
This commit is contained in:
Matt Hughes
2021-09-07 15:07:59 -04:00
committed by Matt Hughes
parent 035dfd8522
commit 7089a3fbb4

View File

@@ -44,6 +44,8 @@ class Command(BaseCommand):
instructor = self.get_user(options['instructor'])
course_runs = get_course_runs()
if len(course_runs) == 0:
raise CommandError('No course runs to synchronize')
for course_run in course_runs:
course_key = CourseKey.from_string(course_run.get('key'))
fields = {