File tree 1 file changed +5
-6
lines changed
course_discovery/apps/course_metadata/data_loaders 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,11 @@ def ingest(self): # pylint: disable=too-many-statements
169
169
course = Course .objects .filter_drafts (key = course_key , partner = self .partner ).first ()
170
170
is_course_created = False
171
171
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
+ )
173
177
174
178
if course :
175
179
try :
@@ -200,11 +204,6 @@ def ingest(self): # pylint: disable=too-many-statements
200
204
course_run = CourseRun .everything .filter (course = course ).first ()
201
205
is_course_created = True
202
206
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
- )
208
207
209
208
is_downloaded = download_and_save_course_image (
210
209
course ,
You can’t perform that action at this time.
0 commit comments