Skip to content

Commit

Permalink
fixed a problem with SQLCutomType
Browse files Browse the repository at this point in the history
  • Loading branch information
mdipierro committed Nov 12, 2017
1 parent b34b8be commit d4bb48b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pydal/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,9 @@ def __init__(self, fieldname, type='string', length=None, default=DEFAULT,
self.notnull = notnull
self.unique = unique
# split to deal with decimal(,)
self.regex = regex or DEFAULT_REGEX.get(self.type.split('(')[0])
self.regex = regex
if not regex and isinstance(self.type, str):
self.regex = DEFAULT_REGEX.get(self.type.split('(')[0])
self.options = options
self.uploadfield = uploadfield
self.uploadfolder = uploadfolder
Expand Down

0 comments on commit d4bb48b

Please sign in to comment.