[IMP] fields.boolean: simplify symbol_set, cast to bool

In combination with f28be81, this should help speed up
initialization of new boolean columns. psycopg2 handles
bool parameters values just fine inside cr.mogrify()
This commit is contained in:
Olivier Dony
2014-08-11 12:37:52 +02:00
parent 77fd6fe9d4
commit a2943a4432
+1 -1
View File
@@ -189,7 +189,7 @@ class _column(object):
class boolean(_column):
_type = 'boolean'
_symbol_c = '%s'
_symbol_f = lambda x: x and 'True' or 'False'
_symbol_f = bool
_symbol_set = (_symbol_c, _symbol_f)
def __init__(self, string='unknown', required=False, **args):