mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 00:07:57 -05:00
finalize_completed_campaigns: be careful with cpm attribute.
This commit is contained in:
@@ -780,8 +780,12 @@ def finalize_completed_campaigns(daysago=1):
|
||||
billable_amount = get_billable_amount(camp, billable_impressions)
|
||||
|
||||
if billable_amount >= camp.bid:
|
||||
text = ('%s completed with $%s billable (%s impressions @ $%s).'
|
||||
% (camp, billable_amount, billable_impressions, camp.cpm))
|
||||
if hasattr(camp, 'cpm'):
|
||||
text = '%s completed with $%s billable (%s impressions @ $%s).'
|
||||
text %= (camp, billable_amount, billable_impressions, camp.cpm)
|
||||
else:
|
||||
text = '%s completed with $%s billable (pre-CPM).'
|
||||
text %= (camp, billable_amount)
|
||||
PromotionLog.add(link, text)
|
||||
refund_amount = 0.
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user