[FIX] pms: convert to str mobile from excel (#35)

This commit is contained in:
Miguel Padin
2021-01-10 10:40:31 +01:00
committed by GitHub
parent a1f5c0bce7
commit e4fb42b48d

View File

@@ -191,7 +191,7 @@ class PmsCheckinPartner(models.Model):
if not re.search(
r"^(\d{3}[\-\s]?\d{2}[\-\s]?\d{2}[\-\s]?\d{2}[\-\s]?|"
r"\d{3}[\-\s]?\d{3}[\-\s]?\d{3})$",
record.mobile,
str(record.mobile),
):
raise ValidationError(_("'%s' is not a valid phone", record.mobile))