[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7029 - trunk/gnue-common/src/datasources
From: |
reinhard |
Subject: |
[gnue] r7029 - trunk/gnue-common/src/datasources |
Date: |
Tue, 15 Feb 2005 09:18:32 -0600 (CST) |
Author: reinhard
Date: 2005-02-15 09:18:31 -0600 (Tue, 15 Feb 2005)
New Revision: 7029
Modified:
trunk/gnue-common/src/datasources/GConditions.py
Log:
Make it possible to compare integers with booleans. This is necessary for
database drivers that return boolean fields as 0/1 integers.
Modified: trunk/gnue-common/src/datasources/GConditions.py
===================================================================
--- trunk/gnue-common/src/datasources/GConditions.py 2005-02-15 13:50:52 UTC
(rev 7028)
+++ trunk/gnue-common/src/datasources/GConditions.py 2005-02-15 15:18:31 UTC
(rev 7029)
@@ -1241,6 +1241,13 @@
elif isinstance (chkValue, types.LongType):
newValue = long (oldValue)
+ elif hasattr (types, "BooleanType") and \
+ isinstance (chkValue, types.BooleanType):
+ if oldValue == 0:
+ newValue = False
+ else:
+ newValue = True
+
else:
raise ConversionRuleError, (oldValue, chkValue)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7029 - trunk/gnue-common/src/datasources,
reinhard <=