mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Merge pull request #13547 from inietov/fixes/Attempt_to_read_property_asset_tag
Fixed ErrorException: Attempt to read property "asset_tag" on null (rollbar #3541)
This commit is contained in:
commit
a67888f3d3
|
@ -58,8 +58,14 @@ class BulkAssetsController extends Controller
|
|||
switch ($request->input('bulk_actions')) {
|
||||
case 'labels':
|
||||
$this->authorize('view', Asset::class);
|
||||
$assets_found = Asset::find($asset_ids);
|
||||
|
||||
if ($assets_found->isEmpty()){
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
return (new Label)
|
||||
->with('assets', Asset::find($asset_ids))
|
||||
->with('assets', $assets_found)
|
||||
->with('settings', Setting::getSettings())
|
||||
->with('bulkedit', true)
|
||||
->with('count', 0);
|
||||
|
|
Loading…
Reference in a new issue