Skip to content

Commit

Permalink
fix: change open for dictreader
Browse files Browse the repository at this point in the history
  • Loading branch information
varshamenon4 committed Mar 29, 2024
1 parent 609194a commit a383e03
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions edx_exams/apps/core/management/commands/bulk_add_course_staff.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@ def handle(self, *args, **options):
batch_size = options['batch_size']
batch_delay = options['batch_delay']

if csv_path:
with open(csv_path, 'rb') as csv_file:
self.add_course_staff_from_csv(csv_file, batch_size, batch_delay)
# if csv_path:
# with open(csv_path, 'rb') as csv_file:
# self.add_course_staff_from_csv(csv_file, batch_size, batch_delay)

# if csv_path:
with open(csv_path) as csv_file:
self.add_course_staff_from_csv(csv_file, batch_size, batch_delay)

logger.info('Bulk add course staff complete!')

Expand Down

0 comments on commit a383e03

Please sign in to comment.