[Zope] ZSQL field problem

Colin Fox cfox@cfconsulting.ca
13 Aug 2002 16:17:22 -0700


On Tue, 2002-08-13 at 13:47, Geir B=E6kholt wrote:
> Hello Colin,=20
<..>=20
> i think type=3Dnb would work the way you want..
>=20
> (the nb means non-blank , meaning replace the empty string with NULL)

I tried making it 'type=3D"nb"', and I got:

 Invalid empty string value for birthday

I use a script to validate the form fields. I've tried:

if birthday =3D=3D '':
   birthday =3D None

but somewhere it gets turned into the string "None" instead of the
Python value None, and "None" isn't a real date.

So I took the conversion from '' to None out, and got the "Invalid empty
string value for birthday" error.

There must be a way to do this - you couldn't set an integer or float to
'' either. =20
--=20
Colin Fox                                         cfox@cfconsulting.ca
CF Consulting Inc.                                    GPG Fingerprint:
                    D8F0 84E7 E7CC 5C6C 9982  F1A7 A3EB 6EA3 BC97 572F