web/views/editcontroller.py
branchtls-sprint
changeset 884 969c16600fb3
parent 0 b97547f5f1fa
child 907 192800415f59
--- 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()