From 91b829edd329cdfcb5aeed4e7eac56d1543f0ced Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Wed, 25 Oct 2023 13:05:04 -0500 Subject: [PATCH] Fix API get_location by ID (#15506) --- includes/html/api_functions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/html/api_functions.inc.php b/includes/html/api_functions.inc.php index 4177b4dcb5..f7a2b3d543 100644 --- a/includes/html/api_functions.inc.php +++ b/includes/html/api_functions.inc.php @@ -2914,7 +2914,7 @@ function get_location(Illuminate\Http\Request $request) if (empty($location)) { return api_error(400, 'No location has been provided to get'); } - $data = ctype_digit($location) ? Location::find($location_id) : Location::where('location', $location)->first(); + $data = ctype_digit($location) ? Location::find($location) : Location::where('location', $location)->first(); if (empty($data)) { return api_error(404, 'Location does not exist'); }