Fix Blacklist checker for new TZ info

This commit is contained in:
2012-05-20 16:10:47 +01:00
parent 6f571539b9
commit af1ba8744e

View File

@@ -3,6 +3,7 @@ from datetime import datetime
from django.db import models from django.db import models
from django.template.loader import render_to_string from django.template.loader import render_to_string
from django.utils.timezone import now
from eve_api.models import EVEPlayerCharacter from eve_api.models import EVEPlayerCharacter
from hr.app_defines import * from hr.app_defines import *
@@ -29,7 +30,7 @@ def blacklist_values(user, level=BLACKLIST_LEVEL_NOTE):
""" """
blacklist = [] 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 # Check Reddit blacklists
if installed('reddit'): if installed('reddit'):