# HG changeset patch # User Sylvain Thenault # Date 1229702595 -3600 # Node ID 6ba006fb95d16e6470946d5633d85c32ec11894c # Parent 5b58fd1aba50680e261857dcc47ede0d1c2ecc59 don't give a bool instead of a result set to select a view diff -r 5b58fd1aba50 -r 6ba006fb95d1 web/views/baseforms.py --- a/web/views/baseforms.py Fri Dec 19 15:44:11 2008 +0100 +++ b/web/views/baseforms.py Fri Dec 19 17:03:15 2008 +0100 @@ -460,10 +460,11 @@ if self.should_inline_relation_form(entity, rschema, targettype, x): result.append(u'
' % rschema) existant = entity.has_eid() and entity.related(rschema) - # display inline-edition view for all existing related entities - result.append(self.view('inline-edition', existant, 'null', - ptype=entity.e_schema, peid=entity.eid, - rtype=rschema, role=x, **kwargs)) + if existant: + # display inline-edition view for all existing related entities + result.append(self.view('inline-edition', existant, + ptype=entity.e_schema, peid=entity.eid, + rtype=rschema, role=x, **kwargs)) if x == 'subject': card = rschema.rproperty(entity.e_schema, targettype, 'cardinality')[0] else: