NothingToEdit is not a ValidationError, simplify
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 21 Dec 2009 18:46:46 +0100
changeset 4155 80cc9c6ddcf0
parent 4154 f3989908a140
child 4156 1bbb0ee42c8e
NothingToEdit is not a ValidationError, simplify
web/request.py
--- a/web/request.py	Mon Dec 21 18:45:42 2009 +0100
+++ b/web/request.py	Mon Dec 21 18:46:46 2009 +0100
@@ -349,7 +349,7 @@
         try:
             eids = form['eid']
         except KeyError:
-            raise NothingToEdit(None, {None: self._('no selected entities')})
+            raise NothingToEdit(self._('no selected entities'))
         if isinstance(eids, basestring):
             eids = (eids,)
         for peid in eids:
@@ -361,7 +361,7 @@
                 yield peid
             yielded = True
         if not yielded:
-            raise NothingToEdit(None, {None: self._('no selected entities')})
+            raise NothingToEdit(self._('no selected entities'))
 
     # minparams=3 by default: at least eid, __type, and some params to change
     def extract_entity_params(self, eid, minparams=3):