From a380002acafd1024f05dd95f452be01df24b665d Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 13 Jun 2023 14:43:33 +0200 Subject: [PATCH] fix csv EOL --- .../management/commands/teleforma-export-wifi-accounts.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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() -- 2.39.5