From 40391e00d19897c39d2fccfac37ba08499bed3aa Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Sat, 7 Apr 2012 17:56:53 -0700 Subject: [PATCH] Print a warning if someone votes on a weird Thing. --- r2/r2/lib/db/queries.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/r2/r2/lib/db/queries.py b/r2/r2/lib/db/queries.py index d17cc4fb8..626b58aff 100644 --- a/r2/r2/lib/db/queries.py +++ b/r2/r2/lib/db/queries.py @@ -1129,6 +1129,10 @@ def queue_vote(user, thing, dir, ip, organic = False, qname = vote_link_q elif isinstance(thing, Comment): qname = vote_comment_q + else: + log.warning("%s tried to vote on %r. that's not a link or comment!", + user, thing) + return amqp.add_item(qname, pickle.dumps((user._id, thing._fullname,