diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 0a0b85dab7aef21f154ec8647e77e80744cec084..83bbdda4a4113e97f0acd156827e577e0ccc1dea 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2754,7 +2754,11 @@ abstract class CommonObject if (! $error) { $this->db->commit(); - $this->statut = $status; + if (empty($elementId)) // If the element we update was $this (so $elementId is null) + { + $this->statut = $status; + $this->status = $status; + } return 1; } else