mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-29 11:44:28 +01:00
Fix importing csv files containing utf8 characters
The csv module on Python 2 doesn't support utf8 (even encoded as bytes), the easiest fix is to use the csv module backported from Python 3. Fixes #1312 See https://docs.python.org/2/library/csv.html See https://github.com/ryanhiebert/backports.csv
This commit is contained in:
@@ -366,13 +366,13 @@ class User(AbstractUser):
|
||||
"""
|
||||
row = [
|
||||
"account",
|
||||
force_str(self.username),
|
||||
force_str(self.password),
|
||||
force_str(self.first_name),
|
||||
force_str(self.last_name),
|
||||
force_str(self.is_active),
|
||||
force_str(self.role),
|
||||
force_str(self.email)
|
||||
smart_text(self.username),
|
||||
smart_text(self.password),
|
||||
smart_text(self.first_name),
|
||||
smart_text(self.last_name),
|
||||
smart_text(self.is_active),
|
||||
smart_text(self.role),
|
||||
smart_text(self.email)
|
||||
]
|
||||
results = signals.account_exported.send(
|
||||
sender=self.__class__, user=self)
|
||||
|
||||
Reference in New Issue
Block a user