From e6cad77af52d4a648ca7ed64e9f1359c1bf1c395 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 23 Nov 2017 09:51:26 +0100 Subject: [PATCH] bugfix --- .../commands/teleforma-reset-all-passwords-with-mail-test.py | 2 +- .../management/commands/teleforma-students-activate-test.py | 3 ++- teleforma/management/commands/teleforma-students-activate.py | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/teleforma/management/commands/teleforma-reset-all-passwords-with-mail-test.py b/teleforma/management/commands/teleforma-reset-all-passwords-with-mail-test.py index ea04c39d..c1c744a2 100644 --- a/teleforma/management/commands/teleforma-reset-all-passwords-with-mail-test.py +++ b/teleforma/management/commands/teleforma-reset-all-passwords-with-mail-test.py @@ -32,7 +32,7 @@ class Command(BaseCommand): message_template = 'postman/email_user_init.txt' subject_template = 'postman/email_user_subject_init.txt' language_code = 'fr_FR' - username = test + username = 'test' def init_password_email(self, user): site = Site.objects.get_current() diff --git a/teleforma/management/commands/teleforma-students-activate-test.py b/teleforma/management/commands/teleforma-students-activate-test.py index 7e9fc0cd..918acd66 100644 --- a/teleforma/management/commands/teleforma-students-activate-test.py +++ b/teleforma/management/commands/teleforma-students-activate-test.py @@ -29,13 +29,14 @@ class Logger: class Command(BaseCommand): help = "Activate all user account for subscribed students" + username = 'test' def handle(self, *args, **options): period_name = args[-2] log_file = args[-1] logger = Logger(log_file) logger.logger.info('########### Processing #############') - users = User.objects.all() + users = User.objects.filter(username=self.username) period = Period.objects.get(name=period_name) for user in users: diff --git a/teleforma/management/commands/teleforma-students-activate.py b/teleforma/management/commands/teleforma-students-activate.py index ba79ed94..9fe55709 100644 --- a/teleforma/management/commands/teleforma-students-activate.py +++ b/teleforma/management/commands/teleforma-students-activate.py @@ -29,14 +29,13 @@ class Logger: class Command(BaseCommand): help = "Activate all user account for subscribed students" - username = 'test' def handle(self, *args, **options): period_name = args[-2] log_file = args[-1] logger = Logger(log_file) logger.logger.info('########### Processing #############') - users = User.objects.filter(username=self.username) + users = User.objects.all() period = Period.objects.get(name=period_name) for user in users: -- 2.39.5