mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Quarantine: Add discoverable property.
This commit is contained in:
@@ -263,7 +263,7 @@ def is_visible(sr):
|
||||
return (
|
||||
sr.type not in Subreddit.private_types and
|
||||
not sr._spam and
|
||||
not sr.quarantine
|
||||
sr.discoverable
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -601,6 +601,10 @@ class Subreddit(Thing, Printable, BaseSite):
|
||||
def allow_ads(self):
|
||||
return not (self.hide_ads or self.quarantine)
|
||||
|
||||
@property
|
||||
def discoverable(self):
|
||||
return self.allow_top and not self.quarantine
|
||||
|
||||
@related_subreddits.setter
|
||||
def related_subreddits(self, related_subreddits):
|
||||
try:
|
||||
@@ -1016,7 +1020,7 @@ class Subreddit(Thing, Printable, BaseSite):
|
||||
promo_sr_id = cls.get_promote_srid()
|
||||
|
||||
for sr in srs:
|
||||
if sr.quarantine:
|
||||
if not sr.discoverable:
|
||||
continue
|
||||
|
||||
if sr._id == promo_sr_id:
|
||||
|
||||
Reference in New Issue
Block a user