From 5f50cf1ae0c5820f0adb2b7ebd645958e6490693 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Wed, 16 Jul 2014 16:35:19 +0200 Subject: [PATCH] fix profile --- .../management/commands/teleforma-export-wifi-accounts.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/teleforma/management/commands/teleforma-export-wifi-accounts.py b/teleforma/management/commands/teleforma-export-wifi-accounts.py index 70d503b0..78cf43f0 100644 --- a/teleforma/management/commands/teleforma-export-wifi-accounts.py +++ b/teleforma/management/commands/teleforma-export-wifi-accounts.py @@ -19,8 +19,9 @@ class Command(BaseCommand): f = open(path, 'w') for user in User.objects.all(): - profile = user.profile.get() + profile = Profile.objects.filter(user=user) if profile: - f.write(profile.wifi_login + ',' + profile.wifi_pass + '\n') + p = profile[0] + f.write(p.wifi_login + ',' + p.wifi_pass + '\n') f.close() -- 2.39.5