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:
Daniel Meltzer 2018-07-16 16:25:36 -05:00 committed by snipe
parent 50e0b9b84e
commit 8f6e0ad5be

View file

@ -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.');
}
}