Author: johannes
Date: 2006-08-18 02:35:46 -0500 (Fri, 18 Aug 2006)
New Revision: 8569
Modified:
trunk/gnue-forms/src/GFObjects/GFBlock.py
Log:
A boolean field in a query set to False will also match NULL-values
Modified: trunk/gnue-forms/src/GFObjects/GFBlock.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFBlock.py 2006-08-18 07:35:07 UTC (rev
8568)
+++ trunk/gnue-forms/src/GFObjects/GFBlock.py 2006-08-18 07:35:46 UTC (rev
8569)
@@ -1196,6 +1196,12 @@
])
match = True
break
+
+ if not match and isinstance(val, bool) and not val:
+ conditions.append(['or', \
+ ['eq', ['field', entry.field], ['const', val]],
+ ['null', ['field', entry.field]]])
+ match = True
# Falls through to old behaviour if no : condition given or
# the : condition is unknown
_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue