mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-15 18:14:09 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
ea2d54b0f7
|
@ -14,6 +14,7 @@ use App\View\Label;
|
|||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use App\Http\Requests\AssetCheckoutRequest;
|
||||
use App\Models\CustomField;
|
||||
|
@ -95,6 +96,11 @@ class BulkAssetsController extends Controller
|
|||
|
||||
$assets = $assets->get();
|
||||
|
||||
if ($assets->isEmpty()) {
|
||||
Log::debug('No assets were found for the provided IDs', ['ids' => $asset_ids]);
|
||||
return redirect()->back()->with('error', trans('admin/hardware/message.update.assets_do_not_exist_or_are_invalid'));
|
||||
}
|
||||
|
||||
$models = $assets->unique('model_id');
|
||||
$modelNames = [];
|
||||
foreach($models as $model) {
|
||||
|
|
|
@ -41,7 +41,7 @@ class Label implements View
|
|||
$template = LabelModel::find($settings->label2_template);
|
||||
|
||||
// If disabled, pass to legacy view
|
||||
if ((!$settings->label2_enable) && (!$template)) {
|
||||
if ((!$settings->label2_enable)) {
|
||||
return view('hardware/labels')
|
||||
->with('assets', $assets)
|
||||
->with('settings', $settings)
|
||||
|
|
|
@ -19,6 +19,7 @@ return [
|
|||
'success' => 'Asset updated successfully.',
|
||||
'nothing_updated' => 'No fields were selected, so nothing was updated.',
|
||||
'no_assets_selected' => 'No assets were selected, so nothing was updated.',
|
||||
'assets_do_not_exist_or_are_invalid' => 'Selected assets cannot be updated.',
|
||||
],
|
||||
|
||||
'restore' => [
|
||||
|
|
Loading…
Reference in a new issue