diff --git a/modules/bank/bank.py b/modules/bank/bank.py index 9b8d08c88d..62c32883b4 100644 --- a/modules/bank/bank.py +++ b/modules/bank/bank.py @@ -68,7 +68,8 @@ class Bank(ModelSQL, ModelView): pool = Pool() Party = pool.get('party.party') if IBAN: - assert isinstance(bic, BIC) + if not isinstance(bic, BIC): + bic = BIC(bic) banks = cls.search([ ('bic', '=', bic.compact), ], limit=1)