entities/schemaobjs.py
branchstable
changeset 5030 5238d9a8dfee
parent 4839 f482dbdf2f8c
child 5224 34e669b6fd95
child 5421 8167de96c523
--- a/entities/schemaobjs.py	Fri Mar 26 06:57:52 2010 +0100
+++ b/entities/schemaobjs.py	Fri Mar 26 08:28:22 2010 +0100
@@ -9,6 +9,8 @@
 
 from logilab.common.decorators import cached
 
+from yams.schema import role_name
+
 from cubicweb import ValidationError
 from cubicweb.schema import ERQLExpression, RRQLExpression
 
@@ -64,13 +66,14 @@
         for rdef in self.reverse_relation_type:
             card = rdef.cardinality[0]
             if not card in '?1':
+                qname = role_name('inlined', 'subject')
                 rtype = self.name
                 stype = rdef.stype
                 otype = rdef.otype
                 msg = self._cw._("can't set inlined=%(inlined)s, "
                                  "%(stype)s %(rtype)s %(otype)s "
                                  "has cardinality=%(card)s")
-                raise ValidationError(self.eid, {'inlined': msg % locals()})
+                raise ValidationError(self.eid, {qname: msg % locals()})
 
     def db_key_name(self):
         """XXX goa specific"""