2
0
forked from Wavyzz/dolibarr

Fix do not update instance status if method used to update other element

This commit is contained in:
Laurent Destailleur
2016-10-30 15:42:43 +01:00
parent 3ff8a49e4f
commit b4303470f8

View File

@@ -2754,7 +2754,11 @@ abstract class CommonObject
if (! $error)
{
$this->db->commit();
if (empty($elementId)) // If the element we update was $this (so $elementId is null)
{
$this->statut = $status;
$this->status = $status;
}
return 1;
}
else