diff --git a/r2/r2/models/bidding.py b/r2/r2/models/bidding.py index 52248b598..fb278b704 100644 --- a/r2/r2/models/bidding.py +++ b/r2/r2/models/bidding.py @@ -565,7 +565,11 @@ class PromotionWeights(Sessionized, Base): for i in q: if d == i.date: l = links[i.thing_name] - if not promote.is_rejected(l) and not promote.is_unpaid(l) and not l._deleted: + if (not promote.is_rejected(l) and + not promote.is_unpaid(l) and + not l._deleted and + i.promo_idx in getattr(l, 'campaigns', {})): + camp = l.campaigns[i.promo_idx] bid += i.bid refund += i.bid if camp[-1] <= 0 else 0