[csv-upload] Fixing message encoding (#6971)

(cherry picked from commit 48431ab5b9)
This commit is contained in:
John Bodley
2019-03-03 15:27:08 -08:00
committed by Grace Guo
parent f454dedd28
commit 5d8dd1424f

View File

@@ -378,7 +378,7 @@ class CsvToDatabaseView(SimpleFormView):
except OSError:
pass
message = 'Table name {} already exists. Please pick another'.format(
form.name.data) if isinstance(e, IntegrityError) else e
form.name.data) if isinstance(e, IntegrityError) else str(e)
flash(
message,
'danger')