[forms] avoid to create superfluous add_new_relation_link in create form stable
authorKatia Saurfelt <katia.saurfelt@logilab.fr>
Mon, 14 Sep 2009 16:24:01 +0200
branchstable
changeset 3211 7918d4a5cdbf
parent 3197 b27d19c0db1c
child 3235 bad0ff9b0c13
[forms] avoid to create superfluous add_new_relation_link in create form
web/views/formrenderers.py
--- a/web/views/formrenderers.py	Mon Sep 14 11:08:57 2009 +0200
+++ b/web/views/formrenderers.py	Mon Sep 14 16:24:01 2009 +0200
@@ -501,6 +501,7 @@
             w(form.view('inline-creation', None, etype=targettype,
                         peid=entity.eid, ptype=entity.e_schema,
                         rtype=rschema, role=role))
+            existant = True
         # we can create more than one related entity, we thus display a link
         # to add new related entities
         if form.should_display_add_new_relation_link(rschema, existant, card):