web/views/editcontroller.py
changeset 10385 cb3a48780615
parent 10016 984505da8b89
child 10662 10942ed172de
child 11118 0c645f09d96a
--- a/web/views/editcontroller.py	Wed Jun 03 17:22:06 2015 +0200
+++ b/web/views/editcontroller.py	Mon Apr 06 21:49:06 2015 +0200
@@ -161,7 +161,9 @@
                         # simultaneously edited, the current entity must be
                         # created before the target one
                         if rdef.cardinality[0 if role == 'subject' else 1] == '1':
-                            target_eid = values[param]
+                            # use .get since param may be unspecified (though it will usually lead
+                            # to a validation error later)
+                            target_eid = values.get(param)
                             if target_eid in values_by_eid:
                                 # add dependency from the target entity to the
                                 # current one