mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Merge pull request #12752 from inietov/fixes/attempt_to_read_property_on_null
Fixed ErrorException: Attempt to read property "rtd_location_id" on null [sc-20562]
This commit is contained in:
commit
b57b5e23d9
|
@ -832,7 +832,6 @@ class AssetsController extends Controller
|
|||
|
||||
} elseif (request('checkout_to_type') == '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 one
|
||||
$asset->location_id = (($target) && (isset($target->location_id))) ? $target->location_id : '';
|
||||
$error_payload['target_id'] = $request->input('assigned_asset');
|
||||
|
|
Loading…
Reference in a new issue