Skip to content

Commit

Permalink
members: Always open BIC list file in UTF-8 mode to avoid decoding is…
Browse files Browse the repository at this point in the history
…sues
  • Loading branch information
Kurocon committed Aug 23, 2024
1 parent ca00b7e commit 07eaab1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion amelie/members/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ def clean_bic(self):
# handle if does not exist, throw error showing the command to run
try:
# csv file can be updated with `python manage.py update_bic_csv`
with open(os.path.join(settings.MEDIA_ROOT, 'data/bic_list.csv')) as csv_file:
with open(os.path.join(settings.MEDIA_ROOT, 'data/bic_list.csv'), 'r', encoding="utf_8") as csv_file:
csv_reader = csv.reader(csv_file, delimiter=',')
next(csv_reader) # skip the header
for row in csv_reader:
Expand Down

0 comments on commit 07eaab1

Please sign in to comment.