From 3e89e43c2a7341dd5ebafc2a5db806e74a53d71a Mon Sep 17 00:00:00 2001 From: Sylvie Ye Date: Thu, 13 Sep 2018 14:30:51 +0200 Subject: [PATCH] [bnporc] use only recipient id on new recipient remove all 'webid' from budgea --- modules/bnporc/pp/browser.py | 4 +--- modules/bnporc/pp/pages.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/bnporc/pp/browser.py b/modules/bnporc/pp/browser.py index 6c13544c6a..7575425cea 100644 --- a/modules/bnporc/pp/browser.py +++ b/modules/bnporc/pp/browser.py @@ -372,10 +372,8 @@ def init_transfer(self, account, recipient, amount, reason, exec_date): @need_login def send_code(self, recipient, **params): - # depending on whether recipient is a weboob or a budgea backend object. - _id = recipient.webid if hasattr(recipient, 'webid') else recipient.id data = {} - data['idBeneficiaire'] = _id + data['idBeneficiaire'] = recipient.id data['typeActivation'] = 1 data['codeActivation'] = params['code'] return self.activate_recip.go(data=json.dumps(data), headers={'Content-Type': 'application/json'}).get_recipient(recipient) diff --git a/modules/bnporc/pp/pages.py b/modules/bnporc/pp/pages.py index 2c9e67a496..0ca79a8fba 100644 --- a/modules/bnporc/pp/pages.py +++ b/modules/bnporc/pp/pages.py @@ -828,7 +828,7 @@ class ActivateRecipPage(AddRecipPage): def get_recipient(self, recipient): r = Recipient() r.iban = recipient.iban - r.id = recipient.webid if hasattr(recipient, 'webid') else recipient.id + r.id = recipient.id r.label = recipient.label r.category = u'Externe' r.enabled_at = datetime.now().replace(microsecond=0) + timedelta(days=5) -- GitLab