diff --git a/scripts/delete-unused-users.py b/scripts/delete-unused-users.py index 400adb215..6dc8e2e71 100755 --- a/scripts/delete-unused-users.py +++ b/scripts/delete-unused-users.py @@ -41,12 +41,11 @@ async def main(): except: print(user['last_activity']) raise - + last_activity = asyncio if isinstance(last_activity, datetime): was_active_last_day = datetime.now().astimezone() - last_activity < timedelta(hours=24) else: - activity_type = type(last_activity) - print(f"For user {user['name']}, expected datetime.datetime class for last_activity but got {activity_type} instead.") + print(f"For user {user['name']}, expected datetime.datetime class for last_activity but got {type(last_activity)} instead.") raise print(f"User: {user['name']}")