Skip to content

Commit

Permalink
fix: restriction type not appearing in ingestion summary email (#4375)
Browse files Browse the repository at this point in the history
  • Loading branch information
AfaqShuaib09 authored Jul 1, 2024
1 parent 0e29e55 commit 42dd073
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions course_discovery/apps/course_metadata/data_loaders/csv_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,11 @@ def ingest(self): # pylint: disable=too-many-statements
course = Course.objects.filter_drafts(key=course_key, partner=self.partner).first()
is_course_created = False
is_course_run_created = False
course_run_restriction = None
course_run_restriction = (
None
if row.get('restriction_type', None) == 'None'
else row.get('restriction_type', None)
)

if course:
try:
Expand Down Expand Up @@ -200,11 +204,6 @@ def ingest(self): # pylint: disable=too-many-statements
course_run = CourseRun.everything.filter(course=course).first()
is_course_created = True
is_course_run_created = True
course_run_restriction = (
None
if row.get('restriction_type', None) == 'None'
else row.get('restriction_type', None)
)

is_downloaded = download_and_save_course_image(
course,
Expand Down

0 comments on commit 42dd073

Please sign in to comment.