diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 3a2936d0df5..24da596f3c2 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -227,7 +227,7 @@ if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST( $db->commit(); setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); } -} elseif ($valueid > 0) { +} elseif ($action === 'update' && $valueid > 0) { if ($prodcomb->fetch($valueid) < 0) { dol_print_error($db, $langs->trans('ErrorRecordNotFound')); exit();