Don't use g.default_sr for preview links.

On reddit.com it's /r/reddit.com which is pretty
barren these days :)
This commit is contained in:
Neil Williams
2012-03-25 16:39:06 -07:00
parent b279d29ee2
commit a3fae4650f

View File

@@ -389,9 +389,7 @@ def find_preview_links(sr):
# try to find a link to use, otherwise give up and return
links = get_hot([c.site])
if not links:
sr = Subreddit._by_name(g.default_sr)
if sr:
links = get_hot([sr])
links = get_hot(Subreddit.default_subreddits(ids=False))
if links:
links = links[:25]