Added Blacklist Levels

This commit is contained in:
2011-06-02 11:57:20 +01:00
parent 31ff6c372f
commit d2406d6614
6 changed files with 217 additions and 5 deletions

View File

@@ -18,6 +18,7 @@ from eve_proxy.models import CachedDocument
from eve_proxy.exceptions import *
from eve_api.models import EVEAccount, EVEPlayerCharacter
from sso.models import ServiceAccount, Service
from hr.app_defines import *
from hr.models import Blacklist
@@ -196,7 +197,7 @@ class BlacklistHandler(BaseHandler):
def read(self, request):
if request.GET.get('value'):
obj = Blacklist.objects.select_related('blacklistsource').filter(value__icontains=request.GET.get('value'))
obj = Blacklist.objects.select_related('blacklistsource').filter(level__lte=BLACKLIST_LEVEL_ADVISORY,value__icontains=request.GET.get('value'))
if obj.count() and request.GET.get('type'):
obj = obj.filter(type=request.GET.get('type'))
else: