[Zope-CVS] CVS: Products/Ape/lib/apelib/sql - properties.py:1.10

Shane Hathaway shane at zope.com
Wed Mar 24 23:28:53 EST 2004


Update of /cvs-repository/Products/Ape/lib/apelib/sql
In directory cvs.zope.org:/tmp/cvs-serv10156/lib/apelib/sql

Modified Files:
	properties.py 
Log Message:
Fixed boolean properties of fixed schemas.

Storing a boolean as "yes" vs. "" doesn't work in an integer column.


=== Products/Ape/lib/apelib/sql/properties.py 1.9 => 1.10 ===
--- Products/Ape/lib/apelib/sql/properties.py:1.9	Wed Mar 24 22:17:08 2004
+++ Products/Ape/lib/apelib/sql/properties.py	Wed Mar 24 23:28:22 2004
@@ -83,7 +83,7 @@
             else:
                 prop_name = name
             items.append((prop_name, typ, record[n]))
-        return items, tuple(record)
+        return items, tuple([str(value) for value in record])
 
 
     def store(self, event, state, leftover=None):
@@ -101,7 +101,7 @@
                 prop_name = name
             if statedict.has_key(prop_name):
                 value = statedict[prop_name][1]
-                record.append(value)
+                record.append(str(value))
                 data[name] = value
                 del statedict[prop_name]
             else:
@@ -154,6 +154,7 @@
             recs = conn.select(self.table, ('table_name',))
             for (name,) in recs:
                 conn.delete_from(name)
+            self.fixed_props = {}
 
 
     def get_columns_for_class(self, module_name, class_name):




More information about the Zope-CVS mailing list