[editcontroller] turn eid into an int if possible, avoiding pbs. further down (case: preview cube) stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Wed, 28 Jul 2010 14:27:28 +0200
branchstable
changeset 6029 aac5dba278c7
parent 6028 c83167d1b040
child 6031 4b721e739f53
[editcontroller] turn eid into an int if possible, avoiding pbs. further down (case: preview cube)
web/views/editcontroller.py
--- a/web/views/editcontroller.py	Wed Jul 28 11:37:02 2010 +0200
+++ b/web/views/editcontroller.py	Wed Jul 28 14:27:28 2010 +0200
@@ -177,7 +177,7 @@
         """edit / create / copy an entity and return its eid"""
         etype = formparams['__type']
         entity = self._cw.vreg['etypes'].etype_class(etype)(self._cw)
-        entity.eid = formparams['eid']
+        entity.eid = valerror_eid(formparams['eid'])
         is_main_entity = self._cw.form.get('__maineid') == formparams['eid']
         # let a chance to do some entity specific stuff
         entity.cw_adapt_to('IEditControl').pre_web_edit()