[Zope-Checkins] CVS: Packages/ZTUtils - Zope.py:1.11.42.7

Andreas Jung andreas at andreas-jung.com
Thu Aug 18 07:06:33 EDT 2005


Update of /cvs-repository/Packages/ZTUtils
In directory cvs.zope.org:/tmp/cvs-serv29298/lib/python/ZTUtils

Modified Files:
      Tag: Zope-2_7-branch
	Zope.py 
Log Message:

      - Collector #1871: Applied patch to support lists with records using 
        ZTUtils.make_query()


=== Packages/ZTUtils/Zope.py 1.11.42.6 => 1.11.42.7 ===
--- Packages/ZTUtils/Zope.py:1.11.42.6	Tue Jan 27 10:45:35 2004
+++ Packages/ZTUtils/Zope.py	Thu Aug 18 07:06:03 2005
@@ -236,8 +236,14 @@
         elif hasattr(v, 'items'):
             sublist = []
             for sk, sv in v.items():
-                sm = simple_marshal(sv)
-                sublist.append(('%s.%s' % (k, sk), '%s:record' % sm,  sv))
+                if isinstance(sv, list):
+                    for ssv in sv:
+                        sm = simple_marshal(ssv)
+                        sublist.append(('%s.%s' % (k, sk), 
+                                            '%s:list:record' % sm, ssv))
+                else:
+                    sm = simple_marshal(sv)
+                    sublist.append(('%s.%s' % (k, sk), '%s:record' % sm,  sv))
         elif isinstance(v, list):
             sublist = []
             for sv in v:



More information about the Zope-Checkins mailing list