In validate_blob do _force_unicode on giftmessage.

This commit is contained in:
bsimpson63
2013-02-19 09:44:23 -05:00
parent d751319715
commit 60006856cb

View File

@@ -831,7 +831,9 @@ def validate_blob(custom):
except NotFound:
raise GoldException('bad comment')
ret['signed'] = payment_blob.get('signed', False)
ret['giftmessage'] = payment_blob.get('giftmessage', False)
giftmessage = payment_blob.get('giftmessage')
giftmessage = _force_unicode(giftmessage) if giftmessage else None
ret['giftmessage'] = giftmessage
elif goldtype not in ('onetime', 'autorenew', 'creddits'):
raise GoldException('bad goldtype')