Issue 11584

Crashes when creating a new braintree customer
Nosy list
ced, cman, reviewbot, roundup-bot
Assigned to
backport, review

Created on 2022-06-29.22:13:28 by cman, last changed 4 days ago by roundup-bot.


New changeset dad54c88b3ad by C├ędric Krier in branch 'default':
Add braintree prefix to device_data field name
New changeset 677d2e8a8b72 by Chris Chapman in branch 'default':
Add braintree prefix to device_data field name
Author: [hidden] (cman)
Date: 2022-06-30.00:43:48

Yeah, sorry. I was following up with an error that I came across a few weeks ago and was just being lazy, going based on what I remembered. Here's a traceback:

Traceback (most recent call last):
  File "/home/user/tryton/lib64/python3.9/site-packages/trytond/protocols/", line 193, in wrapper
    result = func(request, pool, *args, **kwargs)
  File "/home/user/devel/modules/account_payment_braintree/", line 52, in checkout
  File "/home/user/devel/modules/account_payment_braintree/", line 978, in braintree_set_nonce
    super().braintree_set_nonce(nonce, device_data=device_data)
  File "/home/user/devel/modules/account_payment_braintree/", line 150, in braintree_set_nonce
    self.device_data = device_data
AttributeError: 'account.payment.braintree.customer' object has no attribute 'device_data'
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-06-30.00:11:10

Could you provide the traceback?

Author: [hidden] (cman)
Date: 2022-06-29.22:30:09

Actually, I think it crashed when I was adding a new card to a customer.

Author: [hidden] (cman)
Date: 2022-06-29.22:13:28

Crashes when creating a new braintree customer because device_data is not found on the Payment model (paraphrased).

Date User Action Args
2022-08-08 22:29:28roundup-botsetmessages: + msg77648
2022-08-08 22:29:20roundup-botsetmessages: + msg77647
nosy: + roundup-bot
status: testing -> resolved
2022-06-30 00:48:04cedsetkeyword: + backport
2022-06-30 00:43:48cmansetmessages: + msg77255
2022-06-30 00:11:10cedsetmessages: + msg77254
nosy: + ced
title: Fix braintree device_data assignment -> Crashes when creating a new braintree customer
2022-06-29 22:43:26reviewbotsetmessages: + msg77253
nosy: + reviewbot
2022-06-29 22:30:09cmansetmessages: + msg77252
2022-06-29 22:19:34cmansetkeyword: + review
reviews: 419441003
status: in-progress -> testing
2022-06-29 22:13:28cmancreate

Showing 10 items. Show all history (warning: this could be VERY long)