forked from Minecraft/minecraft_manager
Removed __exact from the end of accepted filters.
parent
b1ac1a908b
commit
6000251a1a
|
@ -63,14 +63,14 @@ class Discord(discord.Client):
|
|||
match = re.match("[{0}]register (\S+)?$".format(self.prefix), message.content)
|
||||
if match:
|
||||
search = match.group(1)
|
||||
count = Application.objects.filter(username__iexact=search, accepted__exact=True).count()
|
||||
count = Application.objects.filter(username__iexact=search, accepted=True).count()
|
||||
|
||||
if count == 0:
|
||||
count = Player.objects.filter(username__iexact=search, application__accepted__exact=True).count()
|
||||
count = Player.objects.filter(username__iexact=search, application__accepted=True).count()
|
||||
|
||||
if count > 0:
|
||||
if count == 1:
|
||||
player = Player.objects.filter(username__iexact=search, application__accepted__exact=True).all()[0]
|
||||
player = Player.objects.filter(username__iexact=search, application__accepted=True).all()[0]
|
||||
nickname = player.username
|
||||
|
||||
if not player.is_banned:
|
||||
|
|
Loading…
Reference in New Issue