POST_request_promo: skip hidden items.

This commit is contained in:
Brian Simpson
2014-03-06 15:01:15 -05:00
parent fe1296a8b5
commit 41fdbce89b
2 changed files with 5 additions and 1 deletions

View File

@@ -3832,7 +3832,7 @@ class ApiController(RedditController):
promo_tuples = promote.lottery_promoted_links(srnames, n=10)
builder = CampaignBuilder(promo_tuples,
wrap=default_thing_wrapper(),
keep_fn=promote.is_promoted,
keep_fn=promote.promo_keep_fn,
num=1,
skip=True)
listing = LinkListing(builder, nextprev=False).listing()

View File

@@ -93,6 +93,10 @@ def cost_per_click(spend, clicks):
return 0
def promo_keep_fn(item):
return is_promoted(item) and not item.hidden
# attrs
def promo_traffic_url(l): # old traffic url