remporarily addressing issue #1203, thanks Simone

This commit is contained in:
mdipierro
2016-03-08 17:22:02 -06:00
parent 4b81f721ac
commit bcc4ae2ec6
3 changed files with 7 additions and 8 deletions

2
fabfile.py vendored
View File

@@ -98,7 +98,7 @@ def git_deploy(appname, repo):
with cd(applications):
sudo('git clone git@github.com/%s %s' % (repo, name))
sudo('chown -R www-data:www-data %s' % name)
def retrieve(appname=None):
"""fab -H username@host retrieve:appname"""
appname = appname or os.path.split(os.getcwd())[-1]

View File

@@ -633,12 +633,11 @@ class IS_IN_DB(Validator):
if self.field.type in ('id','integer'):
new_values = []
for value in values:
if isinstance(value,(int,long)) or value.isdigit():
value = int(value)
elif self.auto_add:
value = self.maybe_add(table, self.fieldnames[0], value)
else:
return (values, translate(self.error_message))
if not (isinstance(value,(int,long)) or value.isdigit()):
if self.auto_add:
value = str(self.maybe_add(table, self.fieldnames[0], value))
else:
return (values, translate(self.error_message))
new_values.append(value)
values = new_values