should remove entities from kwargs (won't go through pyro) stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 16 Oct 2009 17:12:10 +0200
branchstable
changeset 3710 5bfdb591050a
parent 3709 e67ade20bf80
child 3713 a090324efefe
child 3715 e3ccadb126d7
should remove entities from kwargs (won't go through pyro)
__init__.py
--- a/__init__.py	Fri Oct 16 17:11:44 2009 +0200
+++ b/__init__.py	Fri Oct 16 17:12:10 2009 +0200
@@ -141,11 +141,12 @@
         restrictions = set()
         cachekey = []
         pending_relations = []
-        for attr, value in kwargs.iteritems():
+        for attr, value in kwargs.items():
             if isinstance(value, (tuple, list, set, frozenset)):
                 if len(value) == 1:
                     value = iter(value).next()
                 else:
+                    del kwargs[attr]
                     pending_relations.append( (attr, value) )
                     continue
             if hasattr(value, 'eid'): # non final relation