Skip to content

Commit 834f937

Browse files
committed
fix: sincronizzazione agenti
1 parent 46b0f9e commit 834f937

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

modules/anagrafiche/actions.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@
105105
$anagrafica->save();
106106

107107
// Aggiorno gli agenti collegati
108-
$idagenti = (array) post('idagenti');
109-
// Rimuovo eventuali valori vuoti dall'array
110-
$idagenti = array_filter($idagenti, fn ($value) => !empty($value) && $value !== '' && $value !== '0');
108+
$idagenti = array_filter((array) post('idagenti'), fn ($value) => $value !== '' && $value !== null);
111109
$dbo->sync('an_anagrafiche_agenti', ['idanagrafica' => $id_record], ['idagente' => $idagenti]);
112110

113111
flash()->info(tr('Informazioni per l\'anagrafica \"_NAME_\" salvate correttamente.', [

0 commit comments

Comments
 (0)