diff --git a/services/nginx/app/routes/vehiclesRoute.php b/services/nginx/app/routes/vehiclesRoute.php index a61e2b59..ad000aa7 100644 --- a/services/nginx/app/routes/vehiclesRoute.php +++ b/services/nginx/app/routes/vehiclesRoute.php @@ -249,7 +249,7 @@ class vehiclesRoute $response->error('Vehicle not found', 404); } // Check if the user is allowed to delete the vehicle - if ($vehicle->customer_id->value() !== (int)$user->customer_number->value()) { + if ((int)$vehicle->customer_id->value() !== (int)$user->customer_number->value()) { // Check if the user has permission to delete other users vehicles if (!$user->hasPermission('delete_vehicle_other')) { // Log the incident