Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Log when a thing is thrown out in UserController.
Hopefully this helps track down the cause of disappearing
items on the /liked and /disliked pages as well as providing
verification of new query cache stuff.
  • Loading branch information
spladug committed May 4, 2012
1 parent 6ab11b3 commit 4111c73
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions r2/r2/controllers/listingcontroller.py
Expand Up @@ -534,10 +534,19 @@ def keep(item):
wouldkeep = (item._date > utils.timeago('1 %s' % str(self.time)))
if c.user == self.vuser:
if not item.likes and self.where == 'liked':
g.log.warning("unliked thing %s on liked page for %s",
item.fullname,
self.vuser.name)
return False
if item.likes is not False and self.where == 'disliked':
g.log.warning("undisliked thing %s on disliked page for %s",
item.fullname,
self.vuser.name)
return False
if self.where == 'saved' and not item.saved:
g.log.warning("unsaved thing %s on saved page for %s",
item.fullname,
self.vuser.name)
return False
return wouldkeep and (getattr(item, "promoted", None) is None and
(self.where == "deleted" or
Expand Down

0 comments on commit 4111c73

Please sign in to comment.