web/views/editcontroller.py
changeset 9635 aaf099172bb9
parent 9520 78702b55c089
parent 9590 048d6de92b63
child 9774 b7b71be569cf
--- a/web/views/editcontroller.py	Mon Apr 07 14:15:35 2014 +0200
+++ b/web/views/editcontroller.py	Mon Apr 07 17:02:04 2014 +0200
@@ -264,7 +264,7 @@
             errors = dict((f.role_name(), unicode(ex)) for f, ex in self.errors)
             raise ValidationError(valerror_eid(entity.eid), errors)
         if eid is None: # creation or copy
-            entity.eid = self._insert_entity(etype, formparams['eid'], rqlquery)
+            entity.eid = eid = self._insert_entity(etype, formparams['eid'], rqlquery)
         elif rqlquery.edited: # edition of an existant entity
             self._update_entity(eid, rqlquery)
         if is_main_entity: