don't crash if inlined_relation is not defined on the form stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 27 May 2009 16:36:17 +0200
branchstable
changeset 1967 28eed65ce1e6
parent 1965 34f57246330d
child 1968 d3de0f44b57b
don't crash if inlined_relation is not defined on the form
web/formrenderers.py
--- a/web/formrenderers.py	Wed May 27 15:01:19 2009 +0200
+++ b/web/formrenderers.py	Wed May 27 16:36:17 2009 +0200
@@ -390,6 +390,8 @@
 
     def inline_entities_form(self, w, form):
         """create a form to edit entity's inlined relations"""
+        if not hasattr(form, 'inlined_relations'):
+            return
         entity = form.edited_entity
         __ = form.req.__
         for rschema, targettypes, role in form.inlined_relations():