Commit 8b809438 authored by Sylvie Ye's avatar Sylvie Ye Committed by Romain Bignon

[cmso] fix internal transfer

parent 6120e704
......@@ -358,6 +358,8 @@ class CmsoParBrowser(LoginBrowser, StatesMixin):
if recipient.id != recipient.iban:
transfer_data['nature'] = 'interne'
transfer_data['transferToBeneficiary'] = False
transfer_data['creditAccountIndex'] = transfer_data['beneficiaryIndex']
transfer_data.pop('beneficiaryIndex')
self.init_transfer_page.go(json=transfer_data)
transfer = self.page.handle_transfer(account, recipient, amount, reason, exec_date)
......
......@@ -130,7 +130,7 @@ class TransferPage(LoggedPage, JsonPage):
(Dict('exception/code')(self.doc), Dict('exception/message')(self.doc))
elif Dict('exception/type')(self.doc) == 2:
# user error
TransferBankError(message=Dict('exception/message')(self.doc))
raise TransferBankError(message=Dict('exception/message')(self.doc))
def handle_transfer(self, account, recipient, amount, reason, exec_date):
transfer = Transfer()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment