fix bug w/ object relation used as inlined form
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 09 Feb 2010 12:55:08 +0100
changeset 4519 cce343c7d18a
parent 4518 5690bf6d6081
child 4520 1d2c7b3adc39
fix bug w/ object relation used as inlined form
web/views/autoform.py
--- a/web/views/autoform.py	Tue Feb 09 12:54:44 2010 +0100
+++ b/web/views/autoform.py	Tue Feb 09 12:55:08 2010 +0100
@@ -725,7 +725,7 @@
             ttype = ttypes[0].type
             if self.should_inline_relation_form(rschema, ttype, role):
                 formviews = list(self.inline_edition_form_view(rschema, ttype, role))
-                card = rschema.rdef(entity.e_schema, ttype).role_cardinality(role)
+                card = rschema.role_rdef(entity.e_schema, ttype, role).role_cardinality(role)
                 # there is no related entity and we need at least one: we need to
                 # display one explicit inline-creation view
                 if self.should_display_inline_creation_form(rschema, formviews, card):