Skip to content

Commit

Permalink
Fix strange b'' encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
johanvdw committed Jan 30, 2025
1 parent 92c9528 commit 75ddcca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions volunteers/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ def task_schedule_csv(request, template_id):
task.date.strftime('%a'),
task.start_time.strftime('%H:%M'),
task.end_time.strftime('%H:%M'),
'', '', '', '',
'', '', '', '',''
]
writer.writerow([str(s).encode("utf-8") for s in row])
writer.writerow(row)
volunteers = Volunteer.objects.filter(tasks=task)
for number, volunteer in enumerate(volunteers):
row = [
Expand All @@ -159,9 +159,9 @@ def task_schedule_csv(request, template_id):
volunteer.mobile_nbr,
volunteer.matrix_id
]
writer.writerow([str(s).encode("utf-8") for s in row])
row = [''] * 9
writer.writerow([str(s).encode("utf-8") for s in row])
writer.writerow(row)
row = [''] * 10
writer.writerow(row)
return response


Expand Down

0 comments on commit 75ddcca

Please sign in to comment.