Issue 11584

Title
Crashes when creating a new braintree customer
Priority
bug
Status
resolved
Nosy list
ced, cman, reviewbot, roundup-bot
Assigned to
cman
Keywords
backport, review

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

Messages

New changeset dad54c88b3ad by C├ędric Krier in branch 'default':
Add braintree prefix to device_data field name
https://hg.tryton.org/tryton-env/rev/dad54c88b3ad
New changeset 677d2e8a8b72 by Chris Chapman in branch 'default':
Add braintree prefix to device_data field name
https://hg.tryton.org/modules/account_payment_braintree/rev/677d2e8a8b72
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/wrappers.py", line 193, in wrapper
    result = func(request, pool, *args, **kwargs)
  File "/home/user/devel/modules/account_payment_braintree/routes.py", line 52, in checkout
    record.braintree_set_nonce(
  File "/home/user/devel/modules/account_payment_braintree/account.py", line 978, in braintree_set_nonce
    super().braintree_set_nonce(nonce, device_data=device_data)
  File "/home/user/devel/modules/account_payment_braintree/account.py", 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).

History
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)