@@ -247,17 +247,25 @@ def create_collection(self, name, **kwargs):
247247
248248        return  Collection (self , name , ** opts )
249249
250+     def  _apply_incoming_manipulators (self , son , collection ):
251+         for  manipulator  in  self .__incoming_manipulators :
252+             son  =  manipulator .transform_incoming (son , collection )
253+         return  son 
254+ 
255+     def  _apply_incoming_copying_manipulators (self , son , collection ):
256+         for  manipulator  in  self .__incoming_copying_manipulators :
257+             son  =  manipulator .transform_incoming (son , collection )
258+         return  son 
259+ 
250260    def  _fix_incoming (self , son , collection ):
251261        """Apply manipulators to an incoming SON object before it gets stored. 
252262
253263        :Parameters: 
254264          - `son`: the son object going into the database 
255265          - `collection`: the collection the son object is being saved in 
256266        """ 
257-         for  manipulator  in  self .__incoming_manipulators :
258-             son  =  manipulator .transform_incoming (son , collection )
259-         for  manipulator  in  self .__incoming_copying_manipulators :
260-             son  =  manipulator .transform_incoming (son , collection )
267+         son  =  self ._apply_incoming_manipulators (son , collection )
268+         son  =  self ._apply_incoming_copying_manipulators (son , collection )
261269        return  son 
262270
263271    def  _fix_outgoing (self , son , collection ):
0 commit comments