web/views/editcontroller.py
branchstable
changeset 6029 aac5dba278c7
parent 5877 0c7b7b76a84f
child 6033 09db6f4619c9
equal deleted inserted replaced
6028:c83167d1b040 6029:aac5dba278c7
   175 
   175 
   176     def edit_entity(self, formparams, multiple=False):
   176     def edit_entity(self, formparams, multiple=False):
   177         """edit / create / copy an entity and return its eid"""
   177         """edit / create / copy an entity and return its eid"""
   178         etype = formparams['__type']
   178         etype = formparams['__type']
   179         entity = self._cw.vreg['etypes'].etype_class(etype)(self._cw)
   179         entity = self._cw.vreg['etypes'].etype_class(etype)(self._cw)
   180         entity.eid = formparams['eid']
   180         entity.eid = valerror_eid(formparams['eid'])
   181         is_main_entity = self._cw.form.get('__maineid') == formparams['eid']
   181         is_main_entity = self._cw.form.get('__maineid') == formparams['eid']
   182         # let a chance to do some entity specific stuff
   182         # let a chance to do some entity specific stuff
   183         entity.cw_adapt_to('IEditControl').pre_web_edit()
   183         entity.cw_adapt_to('IEditControl').pre_web_edit()
   184         # create a rql query from parameters
   184         # create a rql query from parameters
   185         rqlquery = RqlQuery()
   185         rqlquery = RqlQuery()