def POST_claim_gold_partner_deal_code(self, responder, deal):
     try:
         return {'code': GoldPartnerDealCode.claim_code(c.user, deal)}
     except GoldPartnerCodesExhaustedError:
         return {
             'error': 'GOLD_PARTNER_CODES_EXHAUSTED',
             'explanation': _("sorry, we're out of codes!")
         }
 def POST_claim_gold_partner_deal_code(self, responder, deal):
     try:
         return {'code': GoldPartnerDealCode.claim_code(c.user, deal)}
     except GoldPartnerCodesExhaustedError:
         return {'error': 'GOLD_PARTNER_CODES_EXHAUSTED',
                 'explanation': _("sorry, we're out of codes!")}