server/hooks.py
changeset 62 ef06f71533d9
parent 0 b97547f5f1fa
child 479 ac5c9442b1fd
--- a/server/hooks.py	Thu Nov 13 12:33:18 2008 +0100
+++ b/server/hooks.py	Thu Nov 13 12:34:36 2008 +0100
@@ -245,9 +245,10 @@
             return
         if self.session.unsafe_execute(*self._rql()).rowcount < 1:
             etype = self.session.describe(self.eid)[0]
-            msg = self.session._('at least one relation %s is required on %s(%s)')
-            raise ValidationError(self.eid, {self.rtype: msg % (self.rtype,
-                                                                etype, self.eid)})
+            msg = self.session._('at least one relation %(rtype)s is required on %(etype)s (%(eid)s)')
+            raise ValidationError(self.eid, {self.rtype: msg % {'rtype': self.rtype,
+                                                                'etype': etype,
+                                                                'eid': self.eid}})
     
     def commit_event(self):
         pass