mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
Add guard clause to obtain the default ID of imported asset's status label
This commit is contained in:
parent
17a10a4342
commit
67e47a7d8b
|
@ -12,7 +12,10 @@ class AssetImporter extends ItemImporter
|
|||
public function __construct($filename)
|
||||
{
|
||||
parent::__construct($filename);
|
||||
$this->defaultStatusLabelId = Statuslabel::first()->id;
|
||||
|
||||
if (!is_null(Statuslabel::first())) {
|
||||
$this->defaultStatusLabelId = Statuslabel::first()->id;
|
||||
}
|
||||
}
|
||||
|
||||
protected function handle($row)
|
||||
|
|
Loading…
Reference in a new issue