mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Check that the ID has a value
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
801328ec42
commit
48a916ab77
|
@ -39,7 +39,7 @@ class LocationImporter extends ItemImporter
|
||||||
|
|
||||||
$editingLocation = false;
|
$editingLocation = false;
|
||||||
|
|
||||||
if ($this->findCsvMatch($row, 'id')) {
|
if ($this->findCsvMatch($row, 'id')!='') {
|
||||||
$location = Location::find($this->findCsvMatch($row, 'id'));
|
$location = Location::find($this->findCsvMatch($row, 'id'));
|
||||||
} else {
|
} else {
|
||||||
$location = Location::where('name', '=', $this->findCsvMatch($row, 'name'))->first();
|
$location = Location::where('name', '=', $this->findCsvMatch($row, 'name'))->first();
|
||||||
|
|
Loading…
Reference in a new issue