web/views/autoform.py
branchstable
changeset 5693 8af6623f3d4e
parent 5656 abe97430b3f5
child 5695 85bafafc1f22
--- a/web/views/autoform.py	Wed Jun 09 09:42:24 2010 +0200
+++ b/web/views/autoform.py	Wed Jun 09 09:54:35 2010 +0200
@@ -128,6 +128,7 @@
 from logilab.common.deprecation import deprecated
 
 from cubicweb import typed_eid, neg_role, uilib
+from cubicweb.vreg import classid
 from cubicweb.schema import display_name
 from cubicweb.view import EntityView
 from cubicweb.selectors import (
@@ -307,7 +308,7 @@
         try:
             cls = self._cw.vreg['etypes'].etype_class(self.etype)
         except:
-            self.w(self._cw._('no such entity type %s') % etype)
+            self.w(self._cw._('no such entity type %s') % self.etype)
             return
         entity = cls(self._cw)
         entity.eid = self._cw.varmaker.next()
@@ -733,7 +734,7 @@
         try:
             srels_by_cat = self.srelations_by_category('generic', 'add', strict=True)
             warn('[3.6] %s: srelations_by_category is deprecated, use uicfg or '
-                 'override editable_relations instead' % classid(form),
+                 'override editable_relations instead' % classid(self),
                  DeprecationWarning)
         except AttributeError:
             srels_by_cat = self.editable_relations()