Fix bulk cambio stato intervento

This commit is contained in:
Beppe 2022-04-11 12:44:42 +02:00
parent fb507999cc
commit 88cfa3d4ed
1 changed files with 3 additions and 5 deletions

View File

@ -151,12 +151,10 @@ switch (post('op')) {
foreach ($id_records as $id) {
$intervento = Intervento::find($id);
if (!$intervento->stato->is_completato || ($intervento->stato->is_completato == $stato->is_completato)) {
$intervento->stato()->associate($stato);
$intervento->save();
$intervento->stato()->associate($stato);
$intervento->save();
++$n_interventi;
}
++$n_interventi;
}
if ($n_interventi > 0) {