From: Guillaume Pellerin Date: Tue, 13 Jun 2023 12:43:33 +0000 (+0200) Subject: fix csv EOL X-Git-Tag: 2.9.0~66^2~1 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=a380002acafd1024f05dd95f452be01df24b665d;p=teleforma.git fix csv EOL --- diff --git a/teleforma/management/commands/teleforma-export-wifi-accounts.py b/teleforma/management/commands/teleforma-export-wifi-accounts.py index d4734601..9b246ae6 100644 --- a/teleforma/management/commands/teleforma-export-wifi-accounts.py +++ b/teleforma/management/commands/teleforma-export-wifi-accounts.py @@ -23,7 +23,7 @@ class Command(BaseCommand): f = open(path, 'w') period = Period.objects.get(name=period_name) - s = '' + s+ = "prenom,nom,login,pass\n" for user in User.objects.all(): profile = Profile.objects.filter(user=user) @@ -40,8 +40,7 @@ class Command(BaseCommand): data.append(user.last_name) data.append(p.wifi_login) data.append(p.wifi_pass) - data.append('\n') - s += ','.join(data) + s += ','.join(data)+'\n' f.write(s) f.close()