diff --git a/account_banking_pain_base/models/account_payment_order.py b/account_banking_pain_base/models/account_payment_order.py index 751096e22..21b638725 100644 --- a/account_banking_pain_base/models/account_payment_order.py +++ b/account_banking_pain_base/models/account_payment_order.py @@ -92,7 +92,8 @@ class AccountPaymentOrder(models.Model): # cf section 1.4 "Character set" of the SEPA Credit Transfer # Scheme Customer-to-bank guidelines if gen_args.get('convert_to_ascii'): - value = unidecode(value) + if isinstance(value, unicode): + value = unidecode(value) unallowed_ascii_chars = [ '"', '#', '$', '%', '&', '*', ';', '<', '>', '=', '@', '[', ']', '^', '_', '`', '{', '}', '|', '~', '\\', '!']