fix form instantiation tls-sprint
authorsylvain.thenault@logilab.fr
Fri, 27 Mar 2009 17:08:27 +0100
branchtls-sprint
changeset 1182 78e4080252be
parent 1181 620ec8e6ae19
child 1183 62afd820d3ae
fix form instantiation
common/mixins.py
entities/__init__.py
--- a/common/mixins.py	Fri Mar 27 12:31:42 2009 +0100
+++ b/common/mixins.py	Fri Mar 27 17:08:27 2009 +0100
@@ -234,7 +234,7 @@
     @obsolete('use EntityFieldsForm.object_relation_vocabulary')
     def subject_in_state_vocabulary(self, rschema, limit=None):
         from cubicweb.web.form import EntityFieldsForm
-        return EntityFieldsForm(entity=self).subject_in_state_vocabulary(rtype, limit)
+        return EntityFieldsForm(self.req, None, entity=self).subject_in_state_vocabulary(rschema, limit)
 
 
 
--- a/entities/__init__.py	Fri Mar 27 12:31:42 2009 +0100
+++ b/entities/__init__.py	Fri Mar 27 17:08:27 2009 +0100
@@ -252,12 +252,12 @@
     @obsolete('use EntityFieldsForm.subject_relation_vocabulary')
     def subject_relation_vocabulary(self, rtype, limit):
         from cubicweb.web.form import EntityFieldsForm
-        return EntityFieldsForm(entity=self).subject_relation_vocabulary(rtype, limit)
+        return EntityFieldsForm(self.req, None, entity=self).subject_relation_vocabulary(rtype, limit)
 
     @obsolete('use EntityFieldsForm.object_relation_vocabulary')
     def object_relation_vocabulary(self, rtype, limit):
         from cubicweb.web.form import EntityFieldsForm
-        return EntityFieldsForm(entity=self).object_relation_vocabulary(rtype, limit)
+        return EntityFieldsForm(self.req, None, entity=self).object_relation_vocabulary(rtype, limit)
     
     @obsolete('use AutomaticEntityForm.[e]relations_by_category')
     def relations_by_category(self, categories=None, permission=None):