None check puppet on logout call

This commit is contained in:
Max Sandholm
2023-01-04 18:21:25 +02:00
parent 9fae4f14d2
commit 596c9a5055
+1 -1
View File
@@ -585,7 +585,7 @@ class User(DBUser, AbstractUser, BaseUser):
message: str | None = None,
) -> bool:
puppet = await pu.Puppet.get_by_tgid(self.tgid)
if puppet.is_real_user:
if puppet is not None and puppet.is_real_user:
await puppet.switch_mxid(None, None)
try:
await self.kick_from_portals()