mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Merge pull request #13196 from inietov/fixes/default_status_labels_when_import
Fixed issue when importing Assets and no status labels exists [sc-23359]
This commit is contained in:
commit
8c6bde335e
|
@ -12,7 +12,10 @@ class AssetImporter extends ItemImporter
|
||||||
public function __construct($filename)
|
public function __construct($filename)
|
||||||
{
|
{
|
||||||
parent::__construct($filename);
|
parent::__construct($filename);
|
||||||
$this->defaultStatusLabelId = Statuslabel::first()->id;
|
|
||||||
|
if (!is_null(Statuslabel::first())) {
|
||||||
|
$this->defaultStatusLabelId = Statuslabel::first()->id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function handle($row)
|
protected function handle($row)
|
||||||
|
|
Loading…
Reference in a new issue