From 4111c7338a7c9cb1fd21a0fe3a94a7c608f73a9b Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Thu, 3 May 2012 15:15:48 -0700 Subject: [PATCH] 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. --- r2/r2/controllers/listingcontroller.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/r2/r2/controllers/listingcontroller.py b/r2/r2/controllers/listingcontroller.py index dfa3c9096a..aa4af85440 100755 --- a/r2/r2/controllers/listingcontroller.py +++ b/r2/r2/controllers/listingcontroller.py @@ -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