Created
June 12, 2013 15:27
-
-
Save skyler/5766305 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
old_code = db.execute( | |
'''SELECT coupon_code, coupon_offer | |
FROM surveys | |
WHERE survey_id = %s''', survey_id).first() | |
if old_code: | |
logging.info("Returning old coupon_code %s for survey_id %d and panelist_id %d", | |
old_code, survey_id, panelist_id) | |
return dict(coupon_code=old_code['coupon_code'], | |
coupon_offer=old_code['coupon_offer'], | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment