Skip to content

Commit

Permalink
pep8 and force travis to rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
leonelcamara committed Apr 14, 2016
1 parent bdbc053 commit 59cbe99
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gluon/dal.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ def _default_validators(db, field):
return requires
# does not get here for reference and list:reference
if field.unique:
requires.insert(0,validators.IS_NOT_IN_DB(db, field))
excluded_fields = ['string','upload','text','password','boolean']
requires.insert(0, validators.IS_NOT_IN_DB(db, field))
excluded_fields = ['string', 'upload', 'text', 'password', 'boolean']
if (field.notnull or field.unique) and not field_type in excluded_fields:
requires.insert(0,validators.IS_NOT_EMPTY())
requires.insert(0, validators.IS_NOT_EMPTY())
elif not field.notnull and not field.unique and requires:
requires[0] = validators.IS_EMPTY_OR(requires[0], null='' if field in ('string', 'text', 'password') else None)
return requires
Expand All @@ -93,7 +93,7 @@ def _default_validators(db, field):
DAL.representers = {
'rows_render': sqlhtml.represent,
'rows_xml': sqlhtml.SQLTABLE
}
}
DAL.Field = Field
DAL.Table = Table

Expand Down

0 comments on commit 59cbe99

Please sign in to comment.