Skip to content

Instantly share code, notes, and snippets.

@xsleonard
Created February 27, 2013 00:48
Show Gist options
  • Save xsleonard/5043853 to your computer and use it in GitHub Desktop.
Save xsleonard/5043853 to your computer and use it in GitHub Desktop.
fix missing subreddit submissions
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