Commit f4704dcf authored by Sebastien Robin's avatar Sebastien Robin

from Text should be able to handle None values


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2763 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 08bbc4c8
...@@ -74,6 +74,8 @@ class Telephone(Coordinate, Base): ...@@ -74,6 +74,8 @@ class Telephone(Coordinate, Base):
security.declareProtected(Permissions.ModifyPortalContent, 'fromText') security.declareProtected(Permissions.ModifyPortalContent, 'fromText')
def fromText(self, coordinate_text,reindex_object=1): def fromText(self, coordinate_text,reindex_object=1):
if coordinate_text is None:
coordinate_text = ''
if self.standard_parser.match(coordinate_text): if self.standard_parser.match(coordinate_text):
(country, temp, area, number) = \ (country, temp, area, number) = \
self.standard_parser.match(coordinate_text).groups() self.standard_parser.match(coordinate_text).groups()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment