mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-16 07:42:20 +00:00
Don't check the blacklist if we've got nothing to check, stops stupid all blacklists errors
This commit is contained in:
@@ -44,11 +44,13 @@ def blacklist_values(user):
|
||||
|
||||
# Check Character blacklists
|
||||
characters = evechars.values_list('name', flat=True)
|
||||
if len(characters):
|
||||
objs = bl_items.filter(type=BLACKLIST_TYPE_CHARACTER, value__iregex=r'(' + '|'.join(characters) + ')')
|
||||
blacklist.extend(objs)
|
||||
|
||||
# Check Corporation blacklists
|
||||
corporations = evechars.values_list('corporation__name', flat=True)
|
||||
if len(corporations):
|
||||
objs = bl_items.filter(type=BLACKLIST_TYPE_CORPORATION, value__iregex=r'(' + '|'.join(corporations) + ')')
|
||||
blacklist.extend(objs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user