Skip to content

Commit

Permalink
spam cleanup deletes posts not users
Browse files Browse the repository at this point in the history
  • Loading branch information
ialbert committed Jan 7, 2022
1 parent a80ac84 commit 2dc7bd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion biostar/tools/cleanup/spam.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def main(apply=False, days=7, limit=10, verbose=False):
text = f"spammer: user={user.profile.name}, spam_count={spam_count}"
logger.info(text)
if apply:
user.delete()
posts.filter(spam=Post.SPAM).delete()

if apply and delete_count:
msg = f"spam cleanup, removed {user_count} spammers and {delete_count} spam posts"
Expand Down

0 comments on commit 2dc7bd3

Please sign in to comment.