Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
SearchBuilder: don't keep items with deleted authors.
Browse files Browse the repository at this point in the history
  • Loading branch information
spladug committed Jun 4, 2012
1 parent 555c02a commit dbaa48e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions r2/r2/models/builder.py
Expand Up @@ -482,6 +482,8 @@ def keep_item(self,item):
# TODO: Consider a flag to disable this (and see listingcontroller.py)
if item._spam or item._deleted:
return False
elif getattr(item, "author", None) and item.author._deleted:
return False
else:
return True

Expand Down

0 comments on commit dbaa48e

Please sign in to comment.