commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r6914 - trunk/gnue-common/src/datasources


From: johannes
Subject: [gnue] r6914 - trunk/gnue-common/src/datasources
Date: Thu, 20 Jan 2005 08:30:54 -0600 (CST)

Author: johannes
Date: 2005-01-20 08:30:53 -0600 (Thu, 20 Jan 2005)
New Revision: 6914

Modified:
   trunk/gnue-common/src/datasources/GConditions.py
Log:
Fixed handling of null values for like-conditions


Modified: trunk/gnue-common/src/datasources/GConditions.py
===================================================================
--- trunk/gnue-common/src/datasources/GConditions.py    2005-01-20 14:23:03 UTC 
(rev 6913)
+++ trunk/gnue-common/src/datasources/GConditions.py    2005-01-20 14:30:53 UTC 
(rev 6914)
@@ -675,6 +675,11 @@
 
   def evaluate (self, lookup):
     GBinaryConditionElement.evaluate (self, lookup)
+    # None cannot be like something else. You should use 'NULL' or 'NOT NULL'
+    # instead
+    if self.values [0] is None:
+      return False
+
     strpat = "^%s" % self.values [1]
     strpat = strpat.replace ('?', '.').replace ('%', '.*')
     pattern = re.compile (strpat)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]