Author: tack
Date: Mon Oct 31 20:27:26 2005
New Revision: 888

Modified:
   trunk/base/src/base/db.py

Log:
Fix bug introduced by last check-in


Modified: trunk/base/src/base/db.py
==============================================================================
--- trunk/base/src/base/db.py   (original)
+++ trunk/base/src/base/db.py   Mon Oct 31 20:27:26 2005
@@ -860,16 +860,15 @@
         for row in results:
             type_name = row[0]
             col_desc = query_info["columns"][type_name]
-            result = dict(zip(col_desc, row))
+            result = attrs_defaults[type_name].copy()
+            result.update(dict(zip(col_desc, row)))
             for attr, tp in type_maps[type_name]:
                 result[attr] = tp(result[attr])
 
-            if "pickle" in result:
-                result.update(attrs_defaults[type_name])
-                if result["pickle"]:
-                    pickle = cPickle.loads(str(result["pickle"]))
-                    result.update(pickle)
-                del result["pickle"]
+            if result["pickle"]:
+                pickle = cPickle.loads(str(result["pickle"]))
+                result.update(pickle)
+            del result["pickle"]
 
             # Add convenience parent key, mapping parent_type id to name.
             if result.get("parent_type"):


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to