Rafał Pitoń 11 лет назад
Родитель
Сommit
18f125919e
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      misago/users/bans.py

+ 2 - 4
misago/users/bans.py

@@ -1,8 +1,6 @@
-from datetime import datetime
+from datetime import date, datetime
 
-from django.utils import timezone
 from misago.core import cachebuster
-
 from misago.users.models import Ban
 
 
@@ -63,7 +61,7 @@ def _get_session_bancache(request):
             """
             Make two timezone unaware dates and compare them
             """
-            if ban_cache.get('valid_until') < timezone.now().date():
+            if ban_cache.get('valid_until') < date.today():
                 return None
         return ban_cache
     except KeyError: