web/views/editcontroller.py
changeset 4226 67dd296f864d
parent 4224 5998df006968
child 4231 d55cac808b08
equal deleted inserted replaced
4225:c49bb6e3d343 4226:67dd296f864d
    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):