Commit 8bcd5a28 authored by sylvain.thenault@logilab.fr's avatar sylvain.thenault@logilab.fr
Browse files

allow to instantiate an entity without rset

--HG--
branch : tls-sprint
parent 42e57dbbc585
......@@ -277,7 +277,7 @@ class Entity(AppRsetObject, dict):
orderby.append(orderterm)
return selection, orderby, restrictions
def __init__(self, req, rset, row=None, col=0):
def __init__(self, req, rset=None, row=None, col=0):
AppRsetObject.__init__(self, req, rset, row, col)
dict.__init__(self)
self._related_cache = {}
......
......@@ -482,7 +482,7 @@ class CreationFormView(EditionFormView):
"""creation view for an entity"""
etype = kwargs.pop('etype', self.req.form.get('etype'))
try:
entity = self.vreg.etype_class(etype)(self.req, None, None)
entity = self.vreg.etype_class(etype)(self.req)
except:
self.w(self.req._('no such entity type %s') % etype)
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment