From 0a02ac7465b739d0269d2e140e8f75ebdeaaa684 Mon Sep 17 00:00:00 2001 From: Brian Simpson Date: Wed, 27 Aug 2014 13:56:04 -0400 Subject: [PATCH] Set domain_override for new promos. --- r2/r2/controllers/promotecontroller.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/r2/r2/controllers/promotecontroller.py b/r2/r2/controllers/promotecontroller.py index 9b9c511c1..23caacbdd 100644 --- a/r2/r2/controllers/promotecontroller.py +++ b/r2/r2/controllers/promotecontroller.py @@ -596,6 +596,8 @@ class PromoteApiController(ApiController): l = promote.new_promotion(title, url if kind == 'link' else 'self', selftext if kind == 'self' else '', user, request.ip) + l.domain_override = domain_override or None + l._commit() elif promote.is_promo(l): # changing link type is not allowed