diff --git a/easy_my_coop/models/coop.py b/easy_my_coop/models/coop.py index ead4799..05537c1 100644 --- a/easy_my_coop/models/coop.py +++ b/easy_my_coop/models/coop.py @@ -106,10 +106,11 @@ class SubscriptionRequest(models.Model): def check_iban(self, iban): validated = True - try: - validate_iban(iban) - except ValidationError: - validated = False + if iban: + try: + validate_iban(iban) + except ValidationError: + validated = False return validated @api.multi