dabo Commit
Revision 5616
Date: 2010-02-01 15:36:46 -0800 (Mon, 01 Feb 2010)
Author: Ed
Trac: http://trac.dabodev.com/changeset/5616
Changed:
U trunk/dabo/db/dCursorMixin.py
Log:
Added code to handle the case where a case-insensitive search is being done on
a string type column with null values.
Diff:
Modified: trunk/dabo/db/dCursorMixin.py
===================================================================
--- trunk/dabo/db/dCursorMixin.py 2010-01-31 21:04:03 UTC (rev 5615)
+++ trunk/dabo/db/dCursorMixin.py 2010-02-01 23:36:46 UTC (rev 5616)
@@ -1863,7 +1863,12 @@
if compString and not caseSensitive:
# Change all of the first elements to lower case
- searchList = [first.lower() for first, second in
sortList]
+ def safeLower(val):
+ try:
+ return val.lower()
+ except AttributeError:
+ return val
+ searchList = [safeLower(first) for first, second in
sortList]
matchVal = val.lower()
else:
matchVal = val
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]