On Wed, 9 Feb 2005 10:51:09 -0500 (EST), Asad Habib <ahabib@engin.umich.edu> wrote:
I have a Zope session variable that is set to None. When I update my MySQL database and set the value of one of my fields to the value of this session variable, the value is set to the string 'None'. Anyone encountered a similar problem? I would think that the None object would translate to the NULL database constant and not the string with value 'None'. Any help would be appreciated. Thanks.
You are correct that a Python None should be written to the database as NULL, and vice versa. I can only conclude that something in your application is converting None to 'None' (i.e. str(None)). If you are getting it out of a session variable, this seems likely. -- Computer interfaces should never be made of meat. Using GMail? Setting Reply-to address to <> disables this annoying feature.