fix masto sync

This commit is contained in:
Your Name 2024-01-19 16:46:16 -05:00 committed by Henri Dickson
parent a0d63eed46
commit 48390bcf23

View file

@ -33,7 +33,7 @@ class MastodonUserSync(BaseJob):
.exclude(mastodon_token="")
)
for user in qs.iterator():
if user.last_login < inactive_threshold:
if not user.last_login or user.last_login < inactive_threshold:
last_usage = user.last_usage
if not last_usage or last_usage < inactive_threshold:
logger.warning(f"Skip {user} because of inactivity.")