mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Don't show promos without paid campaigns in "future_promos".
This commit is contained in:
@@ -201,6 +201,14 @@ class PromoteController(ListingController):
|
||||
|
||||
def keep_fn(self):
|
||||
def keep(item):
|
||||
if self.sort == "future_promos":
|
||||
# this sort is used to review links that need to be approved
|
||||
# skip links that don't have any paid campaigns
|
||||
campaigns = list(PromoCampaign._by_link(item._id))
|
||||
if not any(promote.authed_or_not_needed(camp)
|
||||
for camp in campaigns):
|
||||
return False
|
||||
|
||||
if item.promoted and not item._deleted:
|
||||
return True
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user