Cannot update a webform submission when a CiviCRM is enabled
To reproduce
- Install this module
- Create a webform module with CiviCRM enabled (just edit name of a contact is enough).
- Use the form.
- Go to the form results
- Edit the result
- On save the following error is thrown
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '6681' for key 'PRIMARY': INSERT INTO {webform_civicrm_submissions_civirules_trigger} (sid, trigger_fired) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array ( [:db_insert_placeholder_0] => 6681 [:db_insert_placeholder_1] => 1 ) in drupal_write_record() (line 7471 of /var/www/html/includes/common.inc).