From 1a9efa75687019b5e52c8f3de33471748eb42943 Mon Sep 17 00:00:00 2001 From: Thomas Zilio Date: Wed, 16 Jan 2019 16:26:19 +0100 Subject: [PATCH] Fix #442 --- modules/interventi/actions.php | 4 +++- modules/interventi/src/Stato.php | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/interventi/actions.php b/modules/interventi/actions.php index 798955b38..27eb25bd1 100644 --- a/modules/interventi/actions.php +++ b/modules/interventi/actions.php @@ -135,7 +135,9 @@ switch (post('op')) { } $intervento->id_preventivo = post('$idpreventivo'); - $intervento->richiesta = post('richiesta'); + $intervento->richiesta = $richiesta; + + $intervento->save(); // Collego l'intervento al contratto if (!empty($idcontratto)) { diff --git a/modules/interventi/src/Stato.php b/modules/interventi/src/Stato.php index 91185ed20..78f11e27b 100644 --- a/modules/interventi/src/Stato.php +++ b/modules/interventi/src/Stato.php @@ -6,7 +6,8 @@ use Common\Model; class Stato extends Model { - public $primaryKey = 'idstatointervento'; + public $incrementing = false; + protected $primaryKey = 'idstatointervento'; protected $table = 'in_statiintervento'; public function interventi()