web/views/editcontroller.py
changeset 9439 549c999d06d2
parent 9256 697a8181ba30
child 9520 78702b55c089
child 9590 048d6de92b63
--- a/web/views/editcontroller.py	Tue Jan 21 12:34:14 2014 +0100
+++ b/web/views/editcontroller.py	Wed Sep 11 18:04:05 2013 +0200
@@ -158,7 +158,7 @@
                         # if cardinality is 1 and if the target entity is being
                         # simultaneously edited, the current entity must be
                         # created before the target one
-                        if rdef.cardinality[0] == '1':
+                        if rdef.cardinality[0 if role == 'subject' else 1] == '1':
                             target_eid = values[param]
                             if target_eid in values_by_eid:
                                 # add dependency from the target entity to the