Browse Source

Fixed clearattempts command

Ralfp 12 years ago
parent
commit
dfd07be5f7
1 changed files with 2 additions and 1 deletions
  1. 2 1
      misago/management/commands/clearattempts.py

+ 2 - 1
misago/management/commands/clearattempts.py

@@ -1,4 +1,5 @@
 from datetime import timedelta
+from django.core.management.base import BaseCommand
 from django.utils import timezone
 from misago.models import SignInAttempt
 
@@ -7,6 +8,6 @@ class Command(BaseCommand):
     This command is intended to work as CRON job fired every few days to remove failed sign-in attempts
     """
     help = 'Clears sign-in attempts log'
-    def handle(self):
+    def handle(self, *args, **options):
         SignInAttempt.objects.filter(date__lte=timezone.now() - timedelta(hours=24)).delete()
         self.stdout.write('Failed Sign-In attempts older than 24h have been removed.\n')