mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -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,8 +12,11 @@ class AssetImporter extends ItemImporter
|
||||||
public function __construct($filename)
|
public function __construct($filename)
|
||||||
{
|
{
|
||||||
parent::__construct($filename);
|
parent::__construct($filename);
|
||||||
|
|
||||||
|
if (!is_null(Statuslabel::first())) {
|
||||||
$this->defaultStatusLabelId = Statuslabel::first()->id;
|
$this->defaultStatusLabelId = Statuslabel::first()->id;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected function handle($row)
|
protected function handle($row)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue