70 # so we're able to know the main entity from the repository side |
70 # so we're able to know the main entity from the repository side |
71 if '__maineid' in form: |
71 if '__maineid' in form: |
72 req.set_shared_data('__maineid', form['__maineid'], querydata=True) |
72 req.set_shared_data('__maineid', form['__maineid'], querydata=True) |
73 # no specific action, generic edition |
73 # no specific action, generic edition |
74 self._to_create = req.data['eidmap'] = {} |
74 self._to_create = req.data['eidmap'] = {} |
75 self._pending_fields = req.data['pendingfields'] = [] |
75 self._pending_fields = req.data['pendingfields'] = set() |
76 todelete = self._cw.get_pending_deletes() |
76 todelete = self._cw.get_pending_deletes() |
77 toinsert = self._cw.get_pending_inserts() |
77 toinsert = self._cw.get_pending_inserts() |
78 try: |
78 try: |
79 methodname = req.form.pop('__method', None) |
79 methodname = req.form.pop('__method', None) |
80 for eid in req.edited_eids(): |
80 for eid in req.edited_eids(): |
205 if rschema.inlined and rqlquery is not None: |
205 if rschema.inlined and rqlquery is not None: |
206 self.handle_inlined_relation(form, field, value, origvalues, rqlquery) |
206 self.handle_inlined_relation(form, field, value, origvalues, rqlquery) |
207 elif form.edited_entity.has_eid(): |
207 elif form.edited_entity.has_eid(): |
208 self.handle_relation(form, field, value, origvalues) |
208 self.handle_relation(form, field, value, origvalues) |
209 else: |
209 else: |
210 self._pending_fields.append( (form, field) ) |
210 self._pending_fields.add( (form, field) ) |
211 |
211 |
212 except ProcessFormError, exc: |
212 except ProcessFormError, exc: |
213 self.errors.append((field, exc)) |
213 self.errors.append((field, exc)) |
214 |
214 |
215 def handle_inlined_relation(self, form, field, values, origvalues, rqlquery): |
215 def handle_inlined_relation(self, form, field, values, origvalues, rqlquery): |