Created
February 27, 2013 00:48
-
-
Save xsleonard/5043853 to your computer and use it in GitHub Desktop.
fix missing subreddit submissions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from r2.models import Subreddit | |
from r2.lib.db.queries import get_links | |
def fix_sr(name): | |
sr = Subreddit._by_name(name) | |
for sort in ('hot', 'new', 'controversial', 'top'): | |
get_links(sr, sort, 'all').update() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment