web/views/basecontrollers.py
branchstable
changeset 1857 46f975203f4f
parent 1844 ec51bf1b8be3
child 1868 af1ae863606d
--- a/web/views/basecontrollers.py	Tue May 19 10:04:15 2009 +0200
+++ b/web/views/basecontrollers.py	Tue May 19 10:05:19 2009 +0200
@@ -382,11 +382,7 @@
             ctrl.publish(None, fromjson=True)
         except ValidationError, err:
             self.req.cnx.rollback()
-            if not err.entity or isinstance(err.entity, (long, int)):
-                eid = err.entity
-            else:
-                eid = err.entity.eid
-            return (False, (eid, err.errors))
+            return (False, (err.entity, err.errors))
         except Redirect, redir:
             return (True, redir.location)
         except Exception, err: