Browse Source

Avoid a crash if there is a create/write with a wrong field name

pull/88/head
Alexis de Lattre 8 years ago
parent
commit
df392ae1af
  1. 2
      base_phone/fields.py

2
base_phone/fields.py

@ -107,7 +107,7 @@ def convert_all_phone_fields(self, vals, fields_to_convert):
def get_phone_fields(self, vals):
fields_to_convert = []
for key in vals:
if isinstance(self._fields[key], Phone):
if isinstance(self._fields.get(key), Phone):
fields_to_convert.append(key)
return fields_to_convert

Loading…
Cancel
Save