Remove unnecessary redirect

This commit is contained in:
Marcus Moore 2023-09-20 17:35:34 -07:00
parent b1199100a0
commit 5a88a64ebd

View file

@ -3,7 +3,6 @@
namespace App\Http\Livewire;
use App\Models\CustomField;
use Illuminate\Support\Facades\Session;
use Livewire\Component;
use App\Models\Import;
@ -162,11 +161,6 @@ class Importer extends Component
public function mount()
{
if (Session::has('error_message')) {
$this->message = Session::get('error_message');
$this->message_type = 'danger';
}
$this->authorize('import');
$this->progress = -1; // '-1' means 'don't show the progressbar'
$this->progress_bar_class = 'progress-bar-warning';
@ -495,9 +489,10 @@ class Importer extends Component
$this->activeFile = Import::find($id);
if (!$this->activeFile) {
Session::flash('error_message', trans('admin/hardware/message.import.file_missing'));
$this->message = trans('admin/hardware/message.import.file_missing');
$this->message_type = 'danger';
return redirect()->route('imports.index');
return;
}
$this->field_map = null;