Skip to content

Commit 42dd073

Browse files
authored
fix: restriction type not appearing in ingestion summary email (#4375)
1 parent 0e29e55 commit 42dd073

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

course_discovery/apps/course_metadata/data_loaders/csv_loader.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,11 @@ def ingest(self): # pylint: disable=too-many-statements
169169
course = Course.objects.filter_drafts(key=course_key, partner=self.partner).first()
170170
is_course_created = False
171171
is_course_run_created = False
172-
course_run_restriction = None
172+
course_run_restriction = (
173+
None
174+
if row.get('restriction_type', None) == 'None'
175+
else row.get('restriction_type', None)
176+
)
173177

174178
if course:
175179
try:
@@ -200,11 +204,6 @@ def ingest(self): # pylint: disable=too-many-statements
200204
course_run = CourseRun.everything.filter(course=course).first()
201205
is_course_created = True
202206
is_course_run_created = True
203-
course_run_restriction = (
204-
None
205-
if row.get('restriction_type', None) == 'None'
206-
else row.get('restriction_type', None)
207-
)
208207

209208
is_downloaded = download_and_save_course_image(
210209
course,

0 commit comments

Comments
 (0)