A free open source IT asset/license management system
Fixed #4988 - incorrect variable name in asset checkout API method
snipef144d671ff40
diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.phpindex ef89f948ae..6d8c52d728 100644--- a/app/Http/Controllers/Api/AssetsController.php+++ b/app/Http/Controllers/Api/AssetsController.php@@ -557,7 +557,7 @@ class AssetsController extends Controller$error_payload['target_type'] = 'location';} elseif (request('checkout_to_type')=='asset') {- $target = Asset::where('id','!=',$assetId)->find(request('assigned_asset'));+ $target = Asset::where('id','!=',$asset_id)->find(request('assigned_asset'));$asset->location_id = $target->rtd_location_id;// Override with the asset's location_id if it has oneif ($target->location_id!='') {