From 7cd1d0ebf44290eb29bba3207e6e2d82d352c302 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 10 Nov 2016 16:44:15 +0100 Subject: [PATCH] * InfoLog/PostgreSQL: new entries were created with info_id 0: duplicate key value violates unique constraint --- infolog/inc/class.infolog_so.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infolog/inc/class.infolog_so.inc.php b/infolog/inc/class.infolog_so.inc.php index a8af4b59b4..77c72ff660 100644 --- a/infolog/inc/class.infolog_so.inc.php +++ b/infolog/inc/class.infolog_so.inc.php @@ -536,7 +536,7 @@ class infolog_so $to_write = array(); foreach($values as $key => $val) { - if (($key != 'info_id' || $force_insert) && isset($table_def['fd'][$key])) + if (($key != 'info_id' || $force_insert && $info_id > 0) && isset($table_def['fd'][$key])) { $to_write[$key] = $this->data[$key] = $val; // update internal data }