Skip to content

Commit

Permalink
Update delete-unused-users.py
Browse files Browse the repository at this point in the history
Fix logic error in to_delete selection

:wink:
  • Loading branch information
moschlar authored Sep 27, 2023
1 parent d58c950 commit d70fe4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/delete-unused-users.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down

0 comments on commit d70fe4f

Please sign in to comment.