cleanup tls-sprint
authorsylvain.thenault@logilab.fr
Fri, 20 Feb 2009 01:49:00 +0100
branchtls-sprint
changeset 884 969c16600fb3
parent 883 44f1aba675de
child 885 b101d2ae80b4
cleanup
web/views/editcontroller.py
--- a/web/views/editcontroller.py	Fri Feb 20 01:48:38 2009 +0100
+++ b/web/views/editcontroller.py	Fri Feb 20 01:49:00 2009 +0100
@@ -26,17 +26,14 @@
     def publish(self, rset=None, fromjson=False):
         """edit / create / copy / delete entity / relations"""
         self.fromjson = fromjson
-        req = self.req
-        form = req.form
-        for key in form:
+        for key in self.req.form:
             # There should be 0 or 1 action
             if key.startswith('__action_'):
                 cbname = key[1:]
                 try:
                     callback = getattr(self, cbname)
                 except AttributeError:
-                    raise ValidationError(None,
-                                          {None: req._('invalid action %r' % key)})
+                    raise RequestError(self.req._('invalid action %r' % key))
                 else:
                     return callback()
         self._default_publish()