fix validation error info
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 10 Aug 2009 10:00:14 +0200
changeset 52 bc9b616aa2b7
parent 51 d952ecde4fcb
child 53 fd153ecf016d
fix validation error info
hooks.py
--- a/hooks.py	Sun Aug 09 18:41:56 2009 +0200
+++ b/hooks.py	Mon Aug 10 10:00:14 2009 +0200
@@ -31,7 +31,7 @@
                                {'x' : toeid, 'k' : fromeid})
         if not rset:
             msg = session._("this keyword can't be applied to this kind of entity")
-            raise ValidationError(None, msg)
+            raise ValidationError(toeid, {'applied_to': msg})
 
 
 class SetIncludedInRelationOp(PreCommitOperation):