Add None to getSQLValue in SQLDirectory.py

Jose Luis de la Rosa TriviƱo <[email protected]> Wed, 25 Apr 2007 09:42:14 +0200
Newsgroups gmane.comp.web.zope.cps.devel
Message-ID <[email protected]>
Hello everybody,

After a ValueError using an SQLDirectory and searching for the reason I 
found the method getSQLValue 
(https://svn.nuxeo.org/trac/pub/browser/CPS3/products/CPSDirectory/trunk/SQLDirectory.py#L125) 
which quotes from python values to sql values. I thought this method 
needs to deal with None types also, the lines to add would be:

 elif value is None:
            # XXX probably depends on SQL dialect
            return 'NULL'


If you agree I will create a ticket and commit changes to the trunk.

Regards,

Jose Luis.



_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel