diff --git a/htdocs/holiday/class/api_holidays.class.php b/htdocs/holiday/class/api_holidays.class.php index f7c1f900a6a..40d4fa97956 100644 --- a/htdocs/holiday/class/api_holidays.class.php +++ b/htdocs/holiday/class/api_holidays.class.php @@ -412,6 +412,7 @@ class Holidays extends DolibarrApi throw new RestException(403, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } + $this->holiday->status = Holiday::STATUS_APPROVED; $result = $this->holiday->approve(DolibarrApiAccess::$user, $notrigger); if ($result == 0) { throw new RestException(304, 'Error nothing done. May be object is already approved');