web/views/editforms.py
branchstable
changeset 3331 8e63b72287b1
parent 3327 44efba78afac
child 3346 b1fd9d4ef579
--- a/web/views/editforms.py	Fri Sep 18 19:51:13 2009 +0200
+++ b/web/views/editforms.py	Fri Sep 18 19:51:27 2009 +0200
@@ -521,10 +521,11 @@
         :param role: the role played by the `peid` in the relation
         """
         try:
-            entity = self.vreg['etypes'].etype_class(etype)(self.req, None, None)
+            cls = self.vreg['etypes'].etype_class(etype)
         except:
             self.w(self.req._('no such entity type %s') % etype)
             return
         self.initialize_varmaker()
+        entity = cls(self.req)
         entity.eid = self.varmaker.next()
         self.render_form(entity, peid, rtype, role, i18nctx)