]> git.parisson.com Git - teleforma.git/commitdiff
bugfix
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 23 Nov 2017 08:51:26 +0000 (09:51 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 23 Nov 2017 08:51:26 +0000 (09:51 +0100)
teleforma/management/commands/teleforma-reset-all-passwords-with-mail-test.py
teleforma/management/commands/teleforma-students-activate-test.py
teleforma/management/commands/teleforma-students-activate.py

index ea04c39d9fdc791ee592dfb2cbf0d7d2246aef8e..c1c744a257706b58ffa8b76cdecd53e26e7be985 100644 (file)
@@ -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()
index 7e9fc0cde5acab48074279df1e5167b39a89c9c5..918acd66e23abdc70b5cbaded9d5e5db44ec0047 100644 (file)
@@ -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:
index ba79ed9444e6443e6f01f88c5340f05434815004..9fe557093fba14be6678e4ed8e67ae2a4b9db2c8 100644 (file)
@@ -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: