alfonsodg / demo-web2py

Apache License 2.0
0 stars 0 forks source link

Boolean fields always return False #162

Closed alfonsodg closed 10 years ago

alfonsodg commented 10 years ago

From villa...@gmail.com on January 24, 2011 20:15:11

Boolean fields always seem to return False (at least from Firebird) because of unstripped spaces.

My fix is this (which I don't think could do any harm)...

DAL.PY ~Line 1200 following this line: elif field_type == 'boolean':

Please change this next line: if value == True or value == 'T' or value == 't':

To this: if value == True or value.strip().upper() == 'T':

Original issue: http://code.google.com/p/web2py/issues/detail?id=164

alfonsodg commented 10 years ago

From massimo....@gmail.com on January 26, 2011 20:51:55

Status: Fixed