From d70fe4fafe486e09ad5c5c3a7fafbd138e7860d6 Mon Sep 17 00:00:00 2001 From: Moritz Schlarb Date: Wed, 27 Sep 2023 12:42:10 +0200 Subject: [PATCH] Update delete-unused-users.py Fix logic error in to_delete selection :wink: --- scripts/delete-unused-users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/delete-unused-users.py b/scripts/delete-unused-users.py index 73d86379a..0e2111b9e 100755 --- a/scripts/delete-unused-users.py +++ b/scripts/delete-unused-users.py @@ -36,7 +36,7 @@ async def main(): except: print(user['last_activity']) raise - if last_activity and datetime.now().astimezone() - last_activity < timedelta(hours=24) and user['server'] is not None: + if last_activity and datetime.now().astimezone() - last_activity < timedelta(hours=24) or user['server'] is not None: print(f"Not deleting {user['name']}") else: to_delete.append(user['name'])