For promoted links, skip first insertion only 50% of the time

This commit is contained in:
ketralnis
2008-12-04 14:38:37 -08:00
parent 24f8c4f617
commit 1751865839

View File

@@ -80,7 +80,7 @@ def insert_promoted(link_names, sr_ids, logged_in):
# logged in users, and 50% of the time for logged-off users when
# the pool of promoted links is less than 3 (to avoid showing the
# same promoted link to the same person too often)
if logged_in or len(promoted_items) < 3:
if (logged_in or len(promoted_items) < 3) and random.choice((True,False)):
promoted_items.insert(0, None)
# insert one promoted item for every N items