Skip to content

Commit 79962cd

Browse files
committed
fix: import anche senza primary key
1 parent 8d46e81 commit 79962cd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

modules/import/actions.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@
106106

107107
// Gestione automatica dei valori convertiti
108108
$primary_key = post('primary_key');
109-
$csv->setPrimaryKey($primary_key - 1);
109+
if (!empty($primary_key)) {
110+
$csv->setPrimaryKey($primary_key - 1);
111+
}
110112

111113
// Verifica che tutti i campi obbligatori siano mappati
112114
if (!isset($page) || empty($page)) {

0 commit comments

Comments
 (0)