don't call handle_inlined_relation where we're not on the relation'subject
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 18 Jan 2010 12:33:45 +0100
changeset 4249 222fbf826604
parent 4248 d375643eea43
child 4251 3c6569be1f86
don't call handle_inlined_relation where we're not on the relation'subject
web/views/editcontroller.py
--- a/web/views/editcontroller.py	Mon Jan 18 11:55:37 2010 +0100
+++ b/web/views/editcontroller.py	Mon Jan 18 12:33:45 2010 +0100
@@ -202,7 +202,7 @@
                         origvalues = set()
                     if value is None or value == origvalues:
                         continue # not edited / not modified / to do later
-                    if rschema.inlined and rqlquery is not None:
+                    if rschema.inlined and rqlquery is not None and field.role == 'subject':
                         self.handle_inlined_relation(form, field, value, origvalues, rqlquery)
                     elif form.edited_entity.has_eid():
                         self.handle_relation(form, field, value, origvalues)