equal
deleted
inserted
replaced
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() |