Commit a04819e1 authored by Guillaume Risbourg's avatar Guillaume Risbourg Committed by Vincent A

[lcl] Strip new recipient label

New recipients labels are stripped on the website. Without stripping
them, it sometimes failed the assert in `check_values` because of the
trailing space we still had.

Closes: 61817@sibi
parent 032f3130
......@@ -112,7 +112,7 @@ class LCLModule(Module, CapBankWealth, CapBankTransferAddRecipient, CapContact,
@only_for_websites('par', 'pro', 'elcl')
def new_recipient(self, recipient, **params):
# Recipient label has max 15 alphanumrical chars.
recipient.label = ' '.join(w for w in re.sub('[^0-9a-zA-Z ]+', '', recipient.label).split())[:15]
recipient.label = ' '.join(w for w in re.sub('[^0-9a-zA-Z ]+', '', recipient.label).split())[:15].strip()
return self.browser.new_recipient(recipient, **params)
@only_for_websites('par', 'pro', 'elcl')
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