mirror of
https://github.com/solero/houdini.git
synced 2024-11-08 20:28:20 +00:00
Fix TypeError when searching for non-existent friends
This commit is contained in:
parent
68d4bbd6b3
commit
5bf149236a
@ -119,9 +119,10 @@ async def handle_get_player_by_name(p, player_name: str):
|
||||
player = p.server.penguins_by_username[player_name]
|
||||
await p.send_xt('pbn', player.data.id, player.data.id, player.data.nickname)
|
||||
else:
|
||||
player_id, nickname = await Penguin.select('id', 'nickname').where(
|
||||
result = await Penguin.select('id', 'nickname').where(
|
||||
Penguin.username == player_name).gino.first()
|
||||
if player_id is not None:
|
||||
if result is not None:
|
||||
player_id, nickname = result
|
||||
await p.send_xt('pbn', player_id, player_id, nickname)
|
||||
else:
|
||||
await p.send_xt('pbn')
|
||||
|
Loading…
Reference in New Issue
Block a user