From 4baf917d4f923ff166ae1c3cf231c4c9f12eee71 Mon Sep 17 00:00:00 2001 From: Benoit Guillot Date: Tue, 29 Sep 2015 09:26:07 +0200 Subject: [PATCH] [FIX] set countrycode in upper case to avoid error with the lib phonenumbers --- base_phone/base_phone.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base_phone/base_phone.py b/base_phone/base_phone.py index b5fb2b0..0d663be 100644 --- a/base_phone/base_phone.py +++ b/base_phone/base_phone.py @@ -90,7 +90,7 @@ class PhoneCommon(models.AbstractModel): init_value = vals.get(field) try: res_parse = phonenumbers.parse( - vals.get(field), countrycode) + vals.get(field), countrycode.upper()) vals[field] = phonenumbers.format_number( res_parse, phonenumbers.PhoneNumberFormat.E164) if init_value != vals[field]: