mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-25 06:48:01 -05:00
Don't return accounts_active counts from /reddits.
This commit is contained in:
committed by
Neil Williams
parent
eec1066db7
commit
e1cba69d78
@@ -27,6 +27,7 @@ from wrapped import Wrapped, StringTemplate, CacheStub, CachedVariable, Template
|
||||
from mako.template import Template
|
||||
from r2.config.extensions import get_api_subtype
|
||||
from r2.lib.filters import spaceCompress, safemarkdown
|
||||
from r2.models.subreddit import SubSR
|
||||
import time, pytz
|
||||
from pylons import c, g
|
||||
from pylons.i18n import _
|
||||
@@ -219,6 +220,9 @@ class SubredditJsonTemplate(ThingJsonTemplate):
|
||||
if (attr == "_ups" and g.lounge_reddit
|
||||
and thing.name == g.lounge_reddit):
|
||||
return 0
|
||||
# Don't return accounts_active counts in /reddits
|
||||
elif (attr == "accounts_active" and isinstance(c.site, SubSR)):
|
||||
return None
|
||||
else:
|
||||
return ThingJsonTemplate.thing_attr(self, thing, attr)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user