From 34f78f581b131dbc441abd889c1b60cffbe1f27f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charl=C3=A8ne=20Benke?= <1179011+defrance@users.noreply.github.com> Date: Wed, 10 Dec 2025 17:33:10 +0100 Subject: [PATCH] Set holiday status to approved before approval --- htdocs/holiday/class/api_holidays.class.php | 1 + 1 file changed, 1 insertion(+) 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');