diff --git a/mo/db.py b/mo/db.py
index 77282ac2442e6862c2487d5f8c7826d6c214e380..b9f1d42693cff5c9bad3cada8a2a000346fab85b 100644
--- a/mo/db.py
+++ b/mo/db.py
@@ -370,7 +370,7 @@ class User(Base):
return (locale.strxfrm(self.last_name), locale.strxfrm(self.first_name))
def is_inactive(self) -> bool:
- return self.last_login is None
+ return self.last_login_at is None
def get_system_user() -> User: