# HG changeset patch # User Sylvain # Date 1229702700 -3600 # Node ID 716f178f293626aa10effc738b300fd5d718b84a # Parent 3ab7db44f8d8870ea2ea2710c3529195ccbe8ae9# Parent 6ba006fb95d16e6470946d5633d85c32ec11894c merge diff -r 3ab7db44f8d8 -r 716f178f2936 web/views/baseforms.py --- a/web/views/baseforms.py Fri Dec 19 17:04:36 2008 +0100 +++ b/web/views/baseforms.py Fri Dec 19 17:05:00 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: