]> git.parisson.com Git - teleforma.git/commitdiff
Fixed bug in close account
authorGael Le Mignot <gael@pilotsystems.net>
Thu, 3 Jan 2019 14:05:22 +0000 (15:05 +0100)
committerGael Le Mignot <gael@pilotsystems.net>
Thu, 3 Jan 2019 14:05:22 +0000 (15:05 +0100)
teleforma/management/commands/teleforma-close-accounts.py

index 697cd7e2d908ce9bd76c3bb7707caa1fcec820ad..3ae3cf56cda54eb07709d90b2b219cf1d226de81 100644 (file)
@@ -9,7 +9,7 @@ class Command(BaseCommand):
 
     def handle(self, *args, **options):
         today = datetime.date.today()
-        for period in Period.objects.filter(date_close_accounts__gte = today):
+        for period in Period.objects.filter(date_close_accounts__lte = today):
             for student in period.student.filter(user__is_active = True):
                 print "Closing %s %s" % (student, student.user_id)
                 student.user.is_active = False