mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Only error if checking out to asset with same id (#5845)
A user with an id of 2 is perfectly fine as a checkout_target of an asset with an id of 2.
This commit is contained in:
parent
50e0b9b84e
commit
8f6e0ad5be
|
@ -1220,7 +1220,7 @@ class AssetsController extends Controller
|
|||
|
||||
$asset_ids = array_filter(Input::get('selected_assets'));
|
||||
foreach ($asset_ids as $asset_id) {
|
||||
if ($target->id == $asset_id) {
|
||||
if ($target->id == $asset_id && request('checkout_to_type')=='asset') {
|
||||
return redirect()->back()->with('error', 'You cannot check an asset out to itself.');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue