Make sure the status label is deployable

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-05-31 00:13:49 +01:00
parent d02904c9a3
commit 4ccbfb56a4

View file

@ -7,8 +7,10 @@ use App\Models\AssetModel;
use App\Models\Statuslabel;
use App\Models\User;
use App\Events\CheckoutableCheckedIn;
use Carbon\CarbonImmutable;
use Illuminate\Support\Facades\Auth;
use Carbon\Carbon;
use Illuminate\Support\Facades\Log;
class AssetImporter extends ItemImporter
{
@ -19,7 +21,7 @@ class AssetImporter extends ItemImporter
parent::__construct($filename);
if (!is_null(Statuslabel::first())) {
$this->defaultStatusLabelId = Statuslabel::first()->id;
$this->defaultStatusLabelId = Statuslabel::deployable()->first()->id;
}
}