fixed possible bug in dal

This commit is contained in:
mdipierro
2014-06-19 17:17:29 -05:00
parent 21bdf114b4
commit 1ca5e5524e
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.9.5-trunk+timestamp.2014.06.14.10.06.38 Version 2.9.5-trunk+timestamp.2014.06.19.17.16.40
+2 -2
View File
@@ -7315,13 +7315,13 @@ def sqlhtml_validators(field):
def ff(r, id): def ff(r, id):
row = r(id) row = r(id)
if not row: if not row:
return id return str(id)
elif hasattr(r, '_format') and isinstance(r._format, str): elif hasattr(r, '_format') and isinstance(r._format, str):
return r._format % row return r._format % row
elif hasattr(r, '_format') and callable(r._format): elif hasattr(r, '_format') and callable(r._format):
return r._format(row) return r._format(row)
else: else:
return id return str(id)
if field_type in (('string', 'text', 'password')): if field_type in (('string', 'text', 'password')):
requires.append(validators.IS_LENGTH(field_length)) requires.append(validators.IS_LENGTH(field_length))
elif field_type == 'json': elif field_type == 'json':