web/views/basecontrollers.py
branchstable
changeset 3608 5a46e68c3d3c
parent 3599 e64574673827
child 3629 559cad62c786
child 3742 20f429eb5f46
--- a/web/views/basecontrollers.py	Wed Oct 07 19:22:34 2009 +0200
+++ b/web/views/basecontrollers.py	Wed Oct 07 19:59:46 2009 +0200
@@ -201,6 +201,10 @@
             req.exception('unexpected error while validating form')
             return (False, req._(str(ex).decode('utf-8')), ctrl._edited_entity)
         else:
+            # complete entity: it can be used in js callbacks where we might
+            # want every possible information
+            if ctrl._edited_entity:
+                ctrl._edited_entity.complete()
             return (True, ex.location, ctrl._edited_entity)
     except Exception, ex:
         req.cnx.rollback()