Skip to content

Commit 6bd69b1

Browse files
committed
fix: aggiunta sottocategoria
1 parent 9aa68f8 commit 6bd69b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/categorie/actions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
}
103103

104104
// Verifica se esiste già una categoria con lo stesso nome
105-
$categoria_new = (new Categoria())->getByField('title', $nome);
105+
$categoria_new = Categoria::where('name', $nome)->where('id', '!=', $id_record)->where('parent', '=', $id_original)->first();
106106

107107
if (!empty($categoria_new)) {
108108
// Mostra un messaggio di errore con link alla categoria esistente

0 commit comments

Comments
 (0)