Author: reinhard Date: 2009-12-09 15:36:38 -0600 (Wed, 09 Dec 2009) New Revision: 10109
Modified: trunk/gnue-common/src/utils/datatypes.py Log: Empty string in database means the same as NULL. Modified: trunk/gnue-common/src/utils/datatypes.py =================================================================== --- trunk/gnue-common/src/utils/datatypes.py 2009-12-09 21:06:51 UTC (rev 10108) +++ trunk/gnue-common/src/utils/datatypes.py 2009-12-09 21:36:38 UTC (rev 10109) @@ -64,8 +64,9 @@ # everything in a single function helps improving the performance. # -- Reinhard - if value is None: - # "None" is always valid, independent of data type + if value is None or value == "": + # "None" is always valid, independent of data type. We consider an + # empty string the same as None. result = None elif isinstance(value, InvalidValueType): _______________________________________________ commit-gnue mailing list commit-gnue@gnu.org http://lists.gnu.org/mailman/listinfo/commit-gnue