merge
authorSylvain <syt@logilab.fr>
Fri, 19 Dec 2008 17:05:00 +0100
changeset 245 716f178f2936
parent 244 3ab7db44f8d8 (current diff)
parent 240 6ba006fb95d1 (diff)
child 246 cb1f8a1d9d99
merge
--- 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'<div id="inline%sslot">' % 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: