mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-27 07:48:16 -05:00
Add a Subreddit property for active_accounts.
This commit is contained in:
@@ -26,7 +26,7 @@ from pylons import c, g
|
||||
from pylons.i18n import _
|
||||
|
||||
from r2.lib.db.thing import Thing, Relation, NotFound
|
||||
from account import Account
|
||||
from account import Account, AccountsActiveBySR
|
||||
from printable import Printable
|
||||
from r2.lib.db.userrel import UserRel
|
||||
from r2.lib.db.operators import lower, or_, and_, desc
|
||||
@@ -215,6 +215,10 @@ class Subreddit(Thing, Printable):
|
||||
def flair(self):
|
||||
return self.flair_ids()
|
||||
|
||||
@property
|
||||
def accounts_active(self):
|
||||
return AccountsActiveBySR.get_count(self)
|
||||
|
||||
def spammy(self):
|
||||
return self._spam
|
||||
|
||||
|
||||
Reference in New Issue
Block a user