207 # all pending inlined relations to newly created entities have been |
207 # all pending inlined relations to newly created entities have been |
208 # treated now (pop to ensure there are no attempt to add new ones) |
208 # treated now (pop to ensure there are no attempt to add new ones) |
209 pending_inlined = req.data.pop('pending_inlined') |
209 pending_inlined = req.data.pop('pending_inlined') |
210 assert not pending_inlined, pending_inlined |
210 assert not pending_inlined, pending_inlined |
211 # handle all other remaining relations now |
211 # handle all other remaining relations now |
212 for form_, field in req.data.pop('pending_others'): |
212 while req.data['pending_others']: |
|
213 form_, field = req.data['pending_others'].pop() |
213 self.handle_formfield(form_, field) |
214 self.handle_formfield(form_, field) |
|
215 del req.data['pending_others'] |
214 # then execute rql to set all relations |
216 # then execute rql to set all relations |
215 for querydef in self.relations_rql: |
217 for querydef in self.relations_rql: |
216 self._cw.execute(*querydef) |
218 self._cw.execute(*querydef) |
217 # delete pending composite |
219 # delete pending composite |
218 for entity in req.data['pending_composite_delete']: |
220 for entity in req.data['pending_composite_delete']: |