web/views/editcontroller.py
changeset 8128 0a927fe4541b
parent 8041 81794aa0c8b4
child 8190 2a3c1b787688
equal deleted inserted replaced
8125:7070250bf50d 8128:0a927fe4541b
   159         try:
   159         try:
   160             entity = self._cw.execute(rql, rqlquery.kwargs).get_entity(0, 0)
   160             entity = self._cw.execute(rql, rqlquery.kwargs).get_entity(0, 0)
   161             neweid = entity.eid
   161             neweid = entity.eid
   162         except ValidationError, ex:
   162         except ValidationError, ex:
   163             self._to_create[eid] = ex.entity
   163             self._to_create[eid] = ex.entity
   164             if self._cw.json_request: # XXX (syt) why?
   164             if self._cw.ajax_request: # XXX (syt) why?
   165                 ex.entity = eid
   165                 ex.entity = eid
   166             raise
   166             raise
   167         self._to_create[eid] = neweid
   167         self._to_create[eid] = neweid
   168         return neweid
   168         return neweid
   169 
   169