thanks,
I'll santinize the database onec a while.
cheers,
Stef
On 19-01-14 13:45, Niphlod wrote:
or, if indeed you want all strings fields with NULL values (backends
side) or "None" (python side) to map to an empty string '', use
none_value = None
for f in db.table.fields:
if db.table[f
or, if indeed you want all strings fields with NULL values (backends side)
or "None" (python side) to map to an empty string '', use
none_value = None
for f in db.table.fields:
if db.table[f].type == 'string':
db(db.table[f] == None).update(f='')
On Sunday, January 19, 2014 3:21:49
>
> but I mean the field is empty / Null / None (type),
> which is translated by web2py into a string value 'None'.
>
None is translated into a string value as 'None' by Python, not web2py. If
you want different behavior, you have to be explicit (no reason to assume
the default behavior should
thanks,
it's a workaround,
but I mean the field is empty / Null / None (type),
which is translated by web2py into a string value 'None'.
cheers,
Stef
On 18-01-14 19:06, Niphlod wrote:
if you mean the "other" app fills the fields with an actual string
that holds the 'None' value (it could be v
if you mean the "other" app fills the fields with an actual string that
holds the 'None' value (it could be very well "foo", "bar" or "pizza")
then
fake_none_value = 'foo'
for f in db.table.fields:
db(db.table[f] == fake_none_value).update(f=None)
should solve it
On Saturday, January 1
5 matches
Mail list logo