This commit is contained in:
Tulir Asokan
2018-11-15 22:25:49 +02:00
parent 82d7e78455
commit a80fdf0990
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ class AuthAPI(abc.ABC):
async def postprocess_login(self, user: User, user_info) -> None:
existing_user = User.get_by_tgid(user_info.id)
if existing_user != user:
if existing_user and existing_user != user:
await existing_user.log_out()
asyncio.ensure_future(user.post_login(user_info), loop=self.loop)
if user.command_status and user.command_status["action"] == "Login":