mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Merge pull request #14924 from snipe/fixes/possible_nicer_handling_for_defaultStatusLabel
Possible fix for #14915 - error on import when status label is not provided and no deployable statuses can be found
This commit is contained in:
commit
665aa6eb23
|
@ -20,7 +20,9 @@ class AssetImporter extends ItemImporter
|
|||
{
|
||||
parent::__construct($filename);
|
||||
|
||||
if (!is_null(Statuslabel::first())) {
|
||||
$this->defaultStatusLabelId = Statuslabel::first()->id;
|
||||
|
||||
if (!is_null(Statuslabel::deployable()->first())) {
|
||||
$this->defaultStatusLabelId = Statuslabel::deployable()->first()->id;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue