tricycle/lesswrong — pull request #49 by jimrandomh (2012-09-20 17:38:32+00:00)
Title: (UNTESTED) Fix for poll result persistence

There's a bug that keeps poll results from being persisted properly; the Reddit ORM doesn't mark the vote-count summary dirty when it's updated, so when the poll objects are evicted from memory or the server restarts, the counts reset to 0. (The votes are all still there in the raw data, though) This should fix it (although polls created before the fix is applied won't have their totals fixed; that'll take some more work).

However, I haven't tested this at all. Setting up a test environment on my laptop, I ran into a 32-vs-64-bit issue in psycopg2 which I don't have time to fight with right now. So please test this before deploying, because it might not fix the issue or might just be broken entirely.