Skip to content

Commit

Permalink
[FIX] fix swiss localization for iban not required.
Browse files Browse the repository at this point in the history
IBAN number not required so it should not be checked if not provided.
  • Loading branch information
houssine78 authored and huguesdk committed Aug 30, 2023
1 parent 9b93eec commit 3bda99d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions easy_my_coop_website/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,13 @@ def validation(self, kwargs, logged, values, post_file):
return request.render(redirect, values)

iban = kwargs.get("iban")
valid = sub_req_obj.check_iban(iban)
if iban.strip():
valid = sub_req_obj.check_iban(iban)

if not valid:
values = self.fill_values(values, is_company, logged)
values["error_msg"] = _("You iban account number is not valid")
return request.render(redirect, values)
if not valid:
values = self.fill_values(values, is_company, logged)
values["error_msg"] = _("You iban account number is not valid")
return request.render(redirect, values)

# check the subscription's amount
max_amount = company.subscription_maximum_amount
Expand Down

0 comments on commit 3bda99d

Please sign in to comment.