From af1ba8744ede33954391dc344d1027ab2f5937ee Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Sun, 20 May 2012 16:10:47 +0100 Subject: [PATCH] Fix Blacklist checker for new TZ info --- app/hr/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/hr/utils.py b/app/hr/utils.py index f3eedfd..13a524a 100644 --- a/app/hr/utils.py +++ b/app/hr/utils.py @@ -3,6 +3,7 @@ from datetime import datetime from django.db import models from django.template.loader import render_to_string +from django.utils.timezone import now from eve_api.models import EVEPlayerCharacter from hr.app_defines import * @@ -29,7 +30,7 @@ def blacklist_values(user, level=BLACKLIST_LEVEL_NOTE): """ blacklist = [] - bl_items = Blacklist.objects.filter(models.Q(expiry_date__gt=datetime.now()) | models.Q(expiry_date=None), level__lte=level) + bl_items = Blacklist.objects.filter(models.Q(expiry_date__gt=now()) | models.Q(expiry_date=None), level__lte=level) # Check Reddit blacklists if installed('reddit'):