From 52bf2f077728fc49678bbf9000ed5021b1514289 Mon Sep 17 00:00:00 2001 From: KeyserSosa Date: Sat, 16 May 2009 05:03:40 -0700 Subject: [PATCH] put in a temporary hack in the voting code to limit voting to the last 30 days. To be removed when data migration is finished --- r2/r2/controllers/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r2/r2/controllers/api.py b/r2/r2/controllers/api.py index 5b1b74c21..53dc43bd2 100644 --- a/r2/r2/controllers/api.py +++ b/r2/r2/controllers/api.py @@ -700,7 +700,8 @@ class ApiController(RedditController): spam = (c.user._spam or errors.BANNED_IP in c.errors or errors.CHEATER in c.errors) - if thing: + # TODO: temporary hack until we migrate the rest of the vote data + if thing and thing._date > datetime(2009, 4, 17, 0, 0, 0, 0, g.tz): dir = (True if dir > 0 else False if dir < 0 else None)