From f83f46936b525af1cf0ec7d8453638aef0e79f53 Mon Sep 17 00:00:00 2001 From: Brian Simpson Date: Fri, 25 Apr 2014 11:32:27 -0400 Subject: [PATCH] Record rejection reason in PromotionLog. --- r2/r2/lib/promote.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/r2/r2/lib/promote.py b/r2/r2/lib/promote.py index bfe2a4efa..e9cdb4b4c 100644 --- a/r2/r2/lib/promote.py +++ b/r2/r2/lib/promote.py @@ -432,6 +432,8 @@ def accept_promotion(link): def reject_promotion(link, reason=None): was_live = is_promoted(link) update_promote_status(link, PROMOTE_STATUS.rejected) + if reason: + PromotionLog.add(link, "rejected: %s" % reason) # Send a rejection email (unless the advertiser requested the reject) if not c.user or c.user._id != link.author_id: