From 82a1e0dde7ca8355201cdb193b590ae04da37d2f Mon Sep 17 00:00:00 2001 From: Brian Simpson Date: Wed, 13 Nov 2013 14:45:45 -0500 Subject: [PATCH] find_preview_comments/links: use sr rather than c.site. --- r2/r2/lib/cssfilter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/r2/r2/lib/cssfilter.py b/r2/r2/lib/cssfilter.py index 7125cc542..7920abb48 100644 --- a/r2/r2/lib/cssfilter.py +++ b/r2/r2/lib/cssfilter.py @@ -350,7 +350,7 @@ def validate_css(string, generate_https_urls): def find_preview_comments(sr): from r2.lib.db.queries import get_sr_comments, get_all_comments - comments = get_sr_comments(c.site) + comments = get_sr_comments(sr) comments = list(comments) if not comments: comments = get_all_comments() @@ -362,7 +362,7 @@ def find_preview_links(sr): from r2.lib.normalized_hot import get_hot # try to find a link to use, otherwise give up and return - links = get_hot([c.site]) + links = get_hot([sr]) if not links: links = get_hot(Subreddit.default_subreddits(ids=False))