cope with preapproval row being None (bug 712385)
This commit is contained in:
Родитель
0890b4b913
Коммит
2fb3ae946f
|
@ -597,7 +597,6 @@ class TestPaypalStart(PaypalStart):
|
|||
shared_url('addons.purchase.thanks', self.addon))
|
||||
|
||||
|
||||
|
||||
@patch.object(waffle, 'switch_is_active', lambda x: True)
|
||||
@patch.object(settings, 'LOGIN_RATELIMIT_USER', 10)
|
||||
@patch('webapps.models.create_receipt', lambda x: 'receipt')
|
||||
|
|
|
@ -116,7 +116,7 @@ def get_paykey(data):
|
|||
receivers = (data.get('chains', ()), data['email'], data['amount'],
|
||||
data['uuid'])
|
||||
|
||||
if 'preapproval' in data:
|
||||
if data.get('preapproval'):
|
||||
# The paypal_key might be empty if they have removed it.
|
||||
key = data['preapproval'].paypal_key
|
||||
if key:
|
||||
|
|
Загрузка…
Ссылка в новой задаче