Drop the only reference to an '__insert' form key
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 21 Jul 2016 15:32:36 +0200
changeset 11464 96d1aed1e2b5
parent 11463 31e2de4d23a6
child 11465 10ecd586a9a8
Drop the only reference to an '__insert' form key
cubicweb/web/views/editcontroller.py
--- a/cubicweb/web/views/editcontroller.py	Fri Jul 08 10:13:15 2016 +0200
+++ b/cubicweb/web/views/editcontroller.py	Thu Jul 21 15:32:36 2016 +0200
@@ -202,7 +202,7 @@
         except (RequestError, NothingToEdit) as ex:
             if '__linkto' in req.form and 'eid' in req.form:
                 self.execute_linkto()
-            elif not ('__delete' in req.form or '__insert' in req.form):
+            elif '__delete' not in req.form:
                 raise ValidationError(None, {None: text_type(ex)})
         # all pending inlined relations to newly created entities have been
         # treated now (pop to ensure there are no attempt to add new ones)